Custom Player Models

amxx reapi Custom Player Models 0.2.5

Нет прав для скачивания
Установка
  1. Разместите файлы из архива на сервере согласно иерархии архива
  2. Произведите настройки в конфиге custom_player_models.ini
  3. Скомпилируйте плагины (инструкция).
  4. Переместите скомпилированные плагины в директорию /amxmodx/plugins/
Настройки
Поддержка субмоделей, custom_player_models_api.sma
Внимание! Может вызывать проблему с отображением бомбы/дефузера на игроке (игра со сценарием 'бомба')

Код:
// Support submodels (body). Comment to disable and save some CPU.
#define SUPPORT_BODY
Команды переключения видимости моделей, custom_player_models_toggle.sma:
Код:
new const CLCMDS[][] = {
    "say /models",
    "say_team /models"
};
custom_player_models.ini:
Код:
; 'Custom Player Models CFG' plugin configuration file
;
; Format: "access" "key" "tt_model" "tt_body" "ct_model" "ct_body" "expiration_time"
; Access can be:
; #%name% - For specified nickname. Example: #mx?! will set model for nickname 'mx?!' (w/o quotes)
; STEAM_... or VALVE_... for access by authid
; @ - For steam players
; * - For all
; Any other string - access flags ('any of' requirement)
;
; You can use empty access for external purpose (setting models by native from other plugins)
; Key MUST be unique for every row!
; 'Body' means submodel. Just set it to "0" if not sure.
; Note that auth by nickname is not password protected. Use auth by nickname+password in your admin loader.
; Use format '%d.%m.%Y %H:%M' for expiration time, or set it to "" to disable it.
;
; Note that comparing will work until first match, so rows with higher priority should be placed first (see example)
;
; Examples:
; "#mx?!" "maximka" "models/cpm/max.mdl" "0" "models/cpm/max.mdl "1" ""
; "STEAM_0:0:1234567" "splinter" "models/cpm/splinter_tt.mdl" "0" "models/cpm/splinter_ct.mdl" "0" ""
; "abcd" "krang" "models/cpm/krang_tt.mdl" "0" "models/cpm/krang_ct.mdl" "0" ""
; "@" "shreder" "models/cpm/shreder_tt.mdl" "0" "models/cpm/shreder_ct.mdl" "0" "20.04.2025"
; "*" "ninja_turtle" "models/cpm/ninja_turtle_tt.mdl" "0" "models/cpm/ninja_turtle_ct.mdl" "0" "20.04.2025 13:00"
API
Код:
#define CPM_MAX_KEY_LENGTH 32
#define CPM_MAX_MODEL_LENGTH 64

forward custom_player_models_init();

native bool:custom_player_models_register(const key[], const model_tt[], const body_tt, const model_ct[], const body_ct);
native bool:custom_player_models_has(const player, key[] = "", length = 0);
native bool:custom_player_models_set(const player, const key[]);
native bool:custom_player_models_set_body(const player, const any:team, const body);
native bool:custom_player_models_get_body(const player, const any:team, &body);
native bool:custom_player_models_reset(const player);
native bool:custom_player_models_enable(const player, const bool:value);
native bool:custom_player_models_is_enable(const player);
Сверху Снизу