[UAC] Core

reapi core gmx [UAC] Core 0.1.50-alpha

Нет прав для скачивания
Установка
  1. Скопируйте файлы согласно директориям
  2. Откройте uac_core.sma и скомпилируйте плагин (инструкция).
  3. Скопируйте скомпилированный uac_core.amxx в директорию "addons/amxmodx/plugins".
  4. Раскомментируйте uac_core.amxx в /amxmodx/configs/plugins-uac.ini
Настройки
Исходник :
Код:
#define CHANGE_NICK_HOOK 2 // 0 - amxmodx, 1 - fakemeta, 2 - reapi
API
Код:
#if defined _uac_included
    #endinput
#endif

#define _uac_included

#include <uac_consts>
#include <uac_version>

forward UAC_Loading();
forward UAC_Loaded();
forward UAC_Checking(const id);
forward UAC_Checked(const id, const UAC_CheckResult:result);
forward UAC_Pushing();
forward UAC_Pushed();

native bool:UAC_Reload();
native bool:UAC_StartLoad();
native bool:UAC_FinishLoad();
native bool:UAC_Push(const id, const authid[], const password[], const access, const flags, const prefix[], const expired, const otpions);
native UAC_GetSource();
native UAC_GetId();
native UAC_GetAccess();
native UAC_GetFlags();
native UAC_GetPassword(dest[], const length);
native UAC_GetPrefix(dest[], const length);
native UAC_GetExpired();
native UAC_GetOptions();
native bool:UAC_SetAccess(const access);
native UAC_CheckPlayer(id);
native bool:UAC_IterReset();
native bool:UAC_IterEnded();
native bool:UAC_IterNext();
native UAC_GetPlayerPrivilege(const player);
native UAC_GetPlayerExpired(const player);

/*
* This is callback from GMX Core that gives major/minor versions for verifying compatibility for GMX versions.
* Do not modify this!
*/
public __uac_version_check(const majorVersion, const minorVersion) {
    if(majorVersion != UAC_MAJOR_VERSION) {
        set_fail_state("Api major version mismatch; expected %d, real %d", UAC_MAJOR_VERSION, majorVersion);
        return;
    }

    if(minorVersion < UAC_MINOR_VERSION){
        set_fail_state("Api minor version mismatch; expected at least %d, real %d", UAC_MINOR_VERSION, minorVersion);
        return;
    }
}
Код:
#if defined _uac_consts_included
    #endinput
#endif

#define _uac_consts_included

#define UAC_GROUP_MAX_TITLE_LENGTH 32

const UAC_MAX_PASSWORD_LENGTH = 34;
const UAC_MAX_PREFIX_LENGTH = 64;

enum (<<=1) {
    UAC_OPTIONS_MD5 = 1,
    UAC_OPTIONS_STATIC_BANTIME,
    UAC_OPTIONS_RESERVED_NICK,
}

enum UAC_CheckResult {
    UAC_CHECK_IGNORE,
    UAC_CHECK_DEFAULT,
    UAC_CHECK_SUCCESS,
    UAC_CHECK_KICK,
};
Код:
#if defined _uac_version_included
    #endinput
#endif

#define _uac_version_included

#define UAC_MAJOR_VERSION       0
#define UAC_MINOR_VERSION       1
#define UAC_MAINTENANCE_VERSION 50
#define UAC_VERSION_STR         "0.1.50-alpha"
Сверху Снизу