// Support submodels (body). Comment to disable and save some CPU.
#define SUPPORT_BODY
// Support skins (skin). Comment to disable and save some CPU.
#define SUPPORT_SKIN
// Autoconfig filename in 'amxmodx/configs/plugins', excluding the .cfg extension.
// Comment to disable autoconfig.
#define CONFIG_FILENAME "custom_player_models"
// Set to 1 to disable corpses
// -
// Default: "0"
cpm_no_corpses "0"
new const CLCMDS[][] = {
"say /models",
"say_team /models"
};
; 'Custom Player Models CFG' plugin configuration file
;
; Format: "access" "key" "tt_model" "tt_body" "tt_skin" "ct_model" "ct_body" "ct_skin" "expiration_time"
; Access can be:
; #%name% - For specified nickname. Example: #mx?! will set model for nickname 'mx?!' (w/o quotes)
; STEAM_... or VALVE_... or BOT 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.
; 'Skin' means skin. Just set it to "0" if not sure.
; You can view model submodels/skin using 'Paranoia 2 Model Viewer'
; 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" "0" "models/cpm/max.mdl "1" "0" ""
; "STEAM_0:0:1234567" "splinter" "models/cpm/splinter_tt.mdl" "0" "0" "models/cpm/splinter_ct.mdl" "0" "0" ""
; "abcd" "krang" "models/cpm/krang_tt.mdl" "0" "0" "models/cpm/krang_ct.mdl" "0" "0" ""
; "@" "shreder" "models/cpm/shreder_tt.mdl" "0" "0" "models/cpm/shreder_ct.mdl" "0" "0" "20.04.2025"
; "*" "ninja_turtle" "models/cpm/ninja_turtle_tt.mdl" "0" "0" "models/cpm/ninja_turtle_ct.mdl" "0" "0" "20.04.2025 13:00"
#if defined _custom_player_models_included
#endinput
#endif
#define _custom_player_models_included
#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 skin_tt, const model_ct[], const body_ct, const skin_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_set_skin(const player, const any:team, const skin);
native bool:custom_player_models_get_skin(const player, const any:team, &skin);
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);
native bool:custom_player_models_get_path(const player, path[] = "", length = 0);