- Ошибка
-
L 05/24/2024 - 16:36:01: Start of error session.
L 05/24/2024 - 16:36:01: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20240524.log")
L 05/24/2024 - 16:36:01: Invalid index 0 (count: 0)
L 05/24/2024 - 16:36:01: [AMXX] Run time error 10 (plugin "amxbans_core.amxx") (native "ArrayGetString") - debug not enabled!
L 05/24/2024 - 16:36:01: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
Можеть быть и не этот
- ОС
- Windows
- Amx Mod X
-
AMX Mod X 1.9.0.5271 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Jun 24 2020 13:53:30
Built from: https://github.com/alliedmodders/amxmodx/commit/5eea3e5
Build ID: 5271:5eea3e5
Core mode: JIT+ASM32
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.13.0.788-dev
Build date: 07:36:33 Jul 12 2023 (3378)
Build from: https://github.com/dreamstalker/rehlds/commit/f955b07
- ReGamedll
-
ReGameDLL version: 5.26.0.668-dev
Build date: 19:02:48 Dec 31 2023
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/d3c0ec8
- Версия Metamod
-
Metamod-r v1.3.0.131, API (5:13)
Metamod-r build: 18:51:02 Jul 11 2022
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/adc9414
- Список метамодулей
-
Currently loaded plugins:
description stat pend file vers src
load unload
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.0.92c ini
Start Never
[ 2] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini
Start Never
[ 3] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5271 ini
Start ANY
[ 4] WHBlocker RUN - whblocker_mm_i386.so v1.5.697 ini
Chlvl ANY
[ 5] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini
Chlvl ANY
[ 6] Rechecker RUN - rechecker_mm_i386.so v2.5 ini
Chlvl ANY
[ 7] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini
Chlvl ANY
[ 8] Fun RUN - fun_amxx_i386.so v1.9.0.5271 pl3
ANY ANY
[ 9] Engine RUN - engine_amxx_i386.so v1.9.0.5271 pl3
ANY ANY
[10] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5271 pl3
ANY ANY
[11] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5271 pl3
ANY ANY
[12] CSX RUN - csx_amxx_i386.so v1.9.0.5271 pl3
ANY ANY
[13] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5271 pl3
ANY ANY
[14] ReAPI RUN - reapi_amxx_i386.so v5.24.0.300-dev pl3
ANY Never
[15] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl3
ANY Never
[16] MySQL RUN - mysql_amxx_i386.so v1.9.0.5271 pl3
ANY ANY
16 plugins, 16 running
- Список плагинов
-
Currently loaded plugins:
name version author file st
atus
[ 1] Admin Loader 3.5 neygomon admin.amxx ru
nning
[ 2] Admin Chat 1.8.2 AMXX Dev Team adminchat.amxx ru
nning
[ 3] Admin Commands 1.8.2 AMXX Dev Team admincmd.amxx ru
nning
[ 4] Admin Help 1.8.2 AMXX Dev Team adminhelp.amxx ru
nning
[ 5] Admin Votes 1.8.2 AMXX Dev Team adminvote.amxx ru
nning
[ 6] Fake Ping 1.0 MeRcyLeZZ/gyxoBk Ping.amxx ru
nning
[ 7] AES: Bonus CSTRIKE 0.4 serfreeman1337 aes_bonus_cstri ru
nning
[ 8] AES: Bonus System 0.2 serfreeman1337 aes_bonus_syste ru
nning
[ 9] AES: Exp CSTRIKE 0.3 serfreeman1337 aes_exp_cstrike ru
nning
[ 10] AES: Experience Editor 0.1 serfreeman1337 aes_exp_editor. ru
nning
[ 11] AES: Informer 0.2 serfreeman1337 aes_informer.am ru
nning
[ 12] Advanced Experience Sy 0.4.1 serfreeman1337 aes_main.amxx ru
nning
[ 13] Anti Flood 1.8.2 AMXX Dev Team antiflood.amxx ru
nning
[ 14] Csds Map 3.24 Deags/AMXX Commu csds_map.amxx ru
nning
[ 15] Commands Menu 1.8.2 AMXX Dev Team cmdmenu.amxx ru
nning
[ 16] unknown unknown unknown csstats.amxx ru
nning
[ 17] First Blood 0.1 Quasar Firstblood.amxx ru
nning
[ 18] Info. Messages 1.8.2 AMXX Dev Team imessage.amxx ru
nning
[ 19] Maps Menu 1.8.2 AMXX Dev Team mapsmenu.amxx ru
nning
[ 20] Menus Front-End 1.8.2 AMXX Dev Team menufront.amxx ru
nning
[ 21] CS Misc. Stats 1.8.2 AMXX Dev Team miscstats.amxx ru
nning
[ 22] Multi-Lingual System 1.8.2 AMXX Dev Team multilingual.am ru
nning
[ 23] NextMap 1.8.2 AMXX Dev Team nextmap.amxx ru
nning
[ 24] Pause Plugins 1.8.2 AMXX Dev Team pausecfg.amxx ru
nning
[ 25] Players Menu 1.8.2 AMXX Dev Team plmenu.amxx ru
nning
[ 26] Plugin Menu 1.8.2 AMXX Dev Team pluginmenu.amxx ru
nning
[ 27] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a ru
nning
[ 28] Restrict Weapons 1.8.2 AMXX Dev Team restmenu.amxx ru
nning
[ 29] StatsX (MastaMan Editi 1.8.1.3746 AMXX Dev Team & statsx_shell.am ru
nning
[ 30] Scrolling Message 1.8.2 AMXX Dev Team scrollmsg.amxx ru
nning
[ 31] Stats Configuration 1.8.2 AMXX Dev Team statscfg.amxx ru
nning
[ 32] TFC Stats Logging 1.8.2 AMXX Dev Team stats_logging.a ru
nning
[ 33] Teleport Menu 1.8.2 AMXX Dev Team telemenu.amxx ru
nning
[ 34] Multi Jump 1.2 b0t. MultiJump.amxx ru
nning
[ 35] Custom Player Models A 0.2.5 F@nt0M & BlackSi custom_player_m ru
nning
[ 36] Custom Player Models C 0.2.2 BlackSignature custom_player_m ru
nning
[ 37] Custom Player Models T 0.2.1 BlackSignature custom_player_m ru
nning
37 plugins, 37 running
- Автор плагина
- BlackSignature
- Версия плагина
- 0.2.5
- Исходный код
-
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"
"t" "freevip" "models/player/freevip/vip_tt.mdl" "0" "models/player/freevip/vip_ct.mdl" "0"
custom_player_models_api.sma :
#include <amxmodx>
#include <fakemeta>
#include <reapi>
#include "include/custom_player_models.inc"
// Support submodels (body). Comment to disable and save some CPU.
#define SUPPORT_BODY
#define CHECK_NATIVE_ARGS_NUM(%1,%2,%3) \
if (%1 < %2) { \
log_error(AMX_ERR_NATIVE, "Invalid num of arguments %d. Expected %d", %1, %2); \
return %3; \
}
#define CHECK_NATIVE_PLAYER(%1,%2) \
if (!is_user_connected(%1)) { \
log_error(AMX_ERR_NATIVE, "Invalid player %d", %1); \
return %2; \
}
enum _:model_s {
MODEL_INDEX_TT,
MODEL_TT[CPM_MAX_MODEL_LENGTH],
MODEL_BODY_TT,
MODEL_INDEX_CT,
MODEL_CT[CPM_MAX_MODEL_LENGTH],
MODEL_BODY_CT
};
enum _:player_s {
bool:PLAYER_HAS_MODEL,
bool:PLAYER_SEE_MODEL,
PLAYER_MODEL_KEY[CPM_MAX_KEY_LENGTH],
PLAYER_MODEL[model_s],
}
new Trie:Models = Invalid_Trie, Model[model_s];
new Players[MAX_PLAYERS + 1][player_s];
new Receiver;
public plugin_natives() {
register_native("custom_player_models_register", "NativeRegister");
register_native("custom_player_models_has", "NativeHas");
register_native("custom_player_models_set", "NativeSet");
register_native("custom_player_models_set_body", "NativeSetBody");
register_native("custom_player_models_get_body", "NativeGetBody");
register_native("custom_player_models_reset", "NativeReset");
register_native("custom_player_models_enable", "NativeEnable");
register_native("custom_player_models_is_enable", "NativeIsEnable");
}
public plugin_precache() {
register_plugin("Custom Player Models API", "0.2.5", "F@nt0M & BlackSignature");
new ret, fwd = CreateMultiForward("custom_player_models_init", ET_IGNORE);
ExecuteForward(fwd, ret);
DestroyForward(fwd);
}
public plugin_init() {
if (Models != Invalid_Trie) {
RegisterHookChain(RH_SV_WriteFullClientUpdate, "SV_WriteFullClientUpdate_Pre", false);
register_forward(FM_AddToFullPack, "AddToFullPack_Post", true);
if(find_plugin_byfile("rt_core.amxx", .ignoreCase = 0) == INVALID_PLUGIN_ID && find_plugin_byfile("revive_teammates.amxx", .ignoreCase = 0) == INVALID_PLUGIN_ID) {
register_message(get_user_msgid("ClCorpse"), "MsgHookClCorpse")
}
else {
log_amx("Plugin 'Revive Teammates' detected, ClCorpse message will not be registered!")
}
}
}
public plugin_end() {
if (Models != Invalid_Trie) {
TrieDestroy(Models);
}
}
public client_connect(id) {
clearPlayer(id);
}
public client_disconnected(id) {
clearPlayer(id);
}
public SV_WriteFullClientUpdate_Pre(const client, const buffer, const receiver) {
if(Receiver && receiver != Receiver) {
return HC_SUPERCEDE;
}
if (Players[receiver][PLAYER_SEE_MODEL] && is_user_connected(client) && Players[client][PLAYER_HAS_MODEL]) {
set_key_value(buffer, "model", "");
}
return HC_CONTINUE;
}
public AddToFullPack_Post(const handle, const e, const ent, const host, const hostflags, const player, const pSet) {
if (!player || !Players[ent][PLAYER_HAS_MODEL] || !Players[host][PLAYER_SEE_MODEL] || !get_orig_retval()) {
return;
}
switch (get_member(ent, m_iTeam)) {
case TEAM_TERRORIST: {
set_es(handle, ES_ModelIndex, Players[ent][PLAYER_MODEL][MODEL_INDEX_TT]);
#if defined SUPPORT_BODY
set_es(handle, ES_Body, Players[ent][PLAYER_MODEL][MODEL_BODY_TT]);
#endif
}
case TEAM_CT: {
set_es(handle, ES_ModelIndex, Players[ent][PLAYER_MODEL][MODEL_INDEX_CT]);
#if defined SUPPORT_BODY
set_es(handle, ES_Body, Players[ent][PLAYER_MODEL][MODEL_BODY_CT]);
#endif
}
}
}
public MsgHookClCorpse() {
enum {
arg_model = 1,
arg_origin_x,
arg_origin_y,
arg_origin_z,
arg_angles_x,
arg_angles_y,
arg_angles_z,
arg_delay,
arg_sequence,
arg_body,
arg_team,
arg_player,
};
new player = get_msg_arg_int(arg_player);
if (!Players[player][PLAYER_HAS_MODEL]) {
return PLUGIN_CONTINUE;
}
new team = get_msg_arg_int(arg_team);
new key;
#if defined SUPPORT_BODY
new custom_body;
#endif
switch (team) {
case TEAM_TERRORIST: {
key = MODEL_TT;
#if defined SUPPORT_BODY
custom_body = Players[player][PLAYER_MODEL][MODEL_BODY_TT];
#endif
}
case TEAM_CT: {
key = MODEL_CT;
#if defined SUPPORT_BODY
custom_body = Players[player][PLAYER_MODEL][MODEL_BODY_CT];
#endif
}
default: {
return PLUGIN_CONTINUE;
}
}
new model[CPM_MAX_MODEL_LENGTH], origin[3], Float:angles[3];
get_msg_arg_string(arg_model, model, charsmax(model));
origin[0] = get_msg_arg_int(arg_origin_x);
origin[1] = get_msg_arg_int(arg_origin_y);
origin[2] = get_msg_arg_int(arg_origin_z);
angles[0] = get_msg_arg_float(arg_angles_x);
angles[1] = get_msg_arg_float(arg_angles_y);
angles[2] = get_msg_arg_float(arg_angles_z);
new delay = get_msg_arg_int(arg_delay);
new sequence = get_msg_arg_int(arg_sequence);
new default_body = get_msg_arg_int(arg_body);
static msgClCorpse;
if(!msgClCorpse) {
msgClCorpse = get_user_msgid("ClCorpse");
}
for (new id = 1; id <= MaxClients; id++) {
if (!is_user_connected(id)) {
continue;
}
message_begin(MSG_ONE, msgClCorpse, .player = id);
if (Players[id][PLAYER_SEE_MODEL]) {
write_string(Players[player][PLAYER_MODEL][key]);
} else {
write_string(model);
}
write_long(origin[0]);
write_long(origin[1]);
write_long(origin[2]);
write_coord_f(angles[0]);
write_coord_f(angles[1]);
write_coord_f(angles[2]);
write_long(delay);
write_byte(sequence);
#if defined SUPPORT_BODY
if (Players[id][PLAYER_SEE_MODEL]) {
write_byte(custom_body);
} else {
write_byte(default_body);
}
#else
write_byte(default_body);
#endif
write_byte(team);
write_byte(player);
message_end();
}
return PLUGIN_HANDLED;
}
public bool:NativeRegister(const plugin, const argc) {
enum { arg_key = 1, arg_model_tt, arg_body_tt, arg_model_ct, arg_body_ct };
CHECK_NATIVE_ARGS_NUM(argc, arg_body_ct, false)
new key[CPM_MAX_KEY_LENGTH];
get_string(arg_key, key, charsmax(key));
if (Models != Invalid_Trie && TrieKeyExists(Models, key)) {
return true;
}
new model[CPM_MAX_MODEL_LENGTH];
get_string(arg_model_tt, model, charsmax(model));
if (!loadModel(model, MODEL_INDEX_TT, MODEL_TT)) {
log_error(AMX_ERR_NATIVE, "Error precache %s", model);
return false;
}
get_string(arg_model_ct, model, charsmax(model));
if (!loadModel(model, MODEL_INDEX_CT, MODEL_CT)) {
log_error(AMX_ERR_NATIVE, "Error precache %s", model);
return false;
}
if (Models == Invalid_Trie) {
Models = TrieCreate();
}
Model[MODEL_BODY_TT] = get_param(arg_body_tt);
Model[MODEL_BODY_CT] = get_param(arg_body_ct);
TrieSetArray(Models, key, Model, sizeof Model);
return true;
}
public bool:NativeHas(const plugin, const argc) {
enum { arg_player = 1, arg_key, arg_length };
CHECK_NATIVE_ARGS_NUM(argc, arg_length, false)
new player = get_param(arg_player);
CHECK_NATIVE_PLAYER(player, false)
if (!Players[player][PLAYER_HAS_MODEL]) {
return false;
}
set_string(arg_key, Players[player][PLAYER_MODEL_KEY], get_param(arg_length));
return true;
}
public bool:NativeSet(const plugin, const argc) {
enum { arg_player = 1, arg_key };
CHECK_NATIVE_ARGS_NUM(argc, arg_key, false)
new player = get_param(arg_player);
CHECK_NATIVE_PLAYER(player, false)
new key[CPM_MAX_KEY_LENGTH];
get_string(arg_key, key, charsmax(key));
if (!TrieGetArray(Models, key, Model, sizeof Model)) {
log_error(AMX_ERR_NATIVE, "Invalid key %s", key);
return false;
}
Players[player][PLAYER_HAS_MODEL] = true;
copy(Players[player][PLAYER_MODEL_KEY], CPM_MAX_KEY_LENGTH - 1, key);
Players[player][PLAYER_MODEL] = Model;
rh_update_user_info(player);
return true;
}
public bool:NativeSetBody(const plugin, const argc) {
enum { arg_player = 1, arg_team, arg_body };
CHECK_NATIVE_ARGS_NUM(argc, arg_body, false)
new player = get_param(arg_player);
CHECK_NATIVE_PLAYER(player, false)
new any:iTeam = get_param(arg_team);
if( !(TEAM_SPECTATOR > iTeam > TEAM_UNASSIGNED) ) {
log_error(AMX_ERR_NATIVE, "Invalid team %d", iTeam);
return false;
}
new body = get_param(arg_body);
new iSetTo = (iTeam == TEAM_TERRORIST) ? MODEL_BODY_TT : MODEL_BODY_CT;
Players[player][PLAYER_MODEL][iSetTo] = body;
return true;
}
public bool:NativeGetBody(const plugin, const argc) {
enum { arg_player = 1, arg_team, arg_body };
CHECK_NATIVE_ARGS_NUM(argc, arg_body, false)
new player = get_param(arg_player);
CHECK_NATIVE_PLAYER(player, false)
new any:iTeam = get_param(arg_team);
if( !(TEAM_SPECTATOR > iTeam > TEAM_UNASSIGNED) ) {
log_error(AMX_ERR_NATIVE, "Invalid team %d", iTeam);
return false;
}
if(!Players[player][PLAYER_HAS_MODEL]) {
return false;
}
new iGetFrom = (iTeam == TEAM_TERRORIST) ? MODEL_BODY_TT : MODEL_BODY_CT;
set_param_byref(arg_body, Players[player][PLAYER_MODEL][iGetFrom]);
return true;
}
public bool:NativeReset(const plugin, const argc) {
enum { arg_player = 1 };
CHECK_NATIVE_ARGS_NUM(argc, arg_player, false)
new player = get_param(arg_player);
CHECK_NATIVE_PLAYER(player, false)
Players[player][PLAYER_HAS_MODEL] = false;
rh_update_user_info(player);
return true;
}
public bool:NativeEnable(const plugin, const argc) {
enum { arg_player = 1, arg_value };
CHECK_NATIVE_ARGS_NUM(argc, arg_value, false)
new player = get_param(arg_player);
CHECK_NATIVE_PLAYER(player, false)
Players[player][PLAYER_SEE_MODEL] = bool:get_param(arg_value);
Receiver = player;
for (new id = 1; id <= MaxClients; id++) {
if (is_user_connected(id) && Players[id][PLAYER_HAS_MODEL] && is_entity(id)) { // is_entity() as botfix
rh_update_user_info(id);
}
}
Receiver = 0;
return true;
}
public bool:NativeIsEnable(const plugin, const argc) {
enum { arg_player = 1 };
CHECK_NATIVE_ARGS_NUM(argc, arg_player, false)
new player = get_param(arg_player);
CHECK_NATIVE_PLAYER(player, false)
return Players[player][PLAYER_SEE_MODEL];
}
bool:loadModel(const model[], const key_index, const key_model) {
if (!file_exists(model, true)) {
return false;
}
Model[key_index] = precache_model(model);
copy(Model[key_model], CPM_MAX_MODEL_LENGTH - 1, model);
return true;
}
clearPlayer(const id) {
Players[id][PLAYER_HAS_MODEL] = false;
Players[id][PLAYER_SEE_MODEL] = true;
arrayset(Players[id][PLAYER_MODEL_KEY], 0, CPM_MAX_KEY_LENGTH - 1);
}
// https://github.com/ufame/ReviveTeammates --->
/**
* Called after the creation of the corpse is completed
*
* @param iEnt corpse entity index
* @param id id of the player whose corpse
* @param vOrigin coordinates of the corpse
*
*/
public rt_creating_corpse_end(const iEnt, const id, const vOrigin[3]) {
if(!Players[id][PLAYER_HAS_MODEL] || !is_entity(iEnt)) {
return;
}
switch (get_member(id, m_iTeam)) {
case TEAM_TERRORIST: {
engfunc(EngFunc_SetModel, iEnt, Players[id][PLAYER_MODEL][MODEL_TT]);
#if defined SUPPORT_BODY
set_entvar(iEnt, var_body, Players[id][PLAYER_MODEL][MODEL_BODY_TT]);
#endif
}
case TEAM_CT: {
engfunc(EngFunc_SetModel, iEnt, Players[id][PLAYER_MODEL][MODEL_CT]);
#if defined SUPPORT_BODY
set_entvar(iEnt, var_body, Players[id][PLAYER_MODEL][MODEL_BODY_CT]);
#endif
}
}
}
custom_player_models_cfg.sma
#include <amxmodx>
#include <reapi>
#include "include/custom_player_models.inc"
// Steam (flag '@') support, comment if you run steam-only server
#define STEAM_SUPPORT
// Config filename in 'amxmodx/configs'
#define CONFIG_FILENAME "custom_player_models.ini"
//#define CONFIG_FILENAME "custom_player_models/models.ini"
//#define DEBUG
#define MAX_AUTHID_LENGTH 64
enum _:access_s {
ACCESS_AUTH[MAX_AUTHID_LENGTH],
ACCESS_KEY[CPM_MAX_MODEL_LENGTH]
};
new Array:g_Models = Invalid_Array, g_Size;
public plugin_init() {
register_plugin("Custom Player Models CFG", "0.2.2", "BlackSignature");
RegisterHookChain(RG_CBasePlayer_GetIntoGame, "CBasePlayer_GetIntoGame_Post", true);
RegisterHookChain(RG_CBasePlayer_SetClientUserInfoName, "CBasePlayer_SetClientUserInfoName_Post", true);
#if defined DEBUG
register_clcmd("radio2", "CmdRadio2");
register_clcmd("radio3", "CmdRadio3");
#endif
}
public custom_player_models_init() {
new path[128];
new len = get_localinfo("amxx_configsdir", path, charsmax(path));
formatex(path[len], charsmax(path) - len, "/%s", CONFIG_FILENAME);
new file = fopen(path, "rt");
if (!file) {
set_fail_state("Can't %s '%s'", file_exists(path) ? "read" : "find", path);
return;
}
g_Models = ArrayCreate(access_s);
new line[256], data[access_s], model_tt[64], body_tt[6], model_ct[64], body_ct[6], time[32];
new systime = get_systime();
while (!feof(file)) {
fgets(file, line, charsmax(line));
if (line[0] == EOS || line[0] == ';') {
continue;
}
if (parse(line,
data[ACCESS_AUTH], charsmax(data[ACCESS_AUTH]),
data[ACCESS_KEY], charsmax(data[ACCESS_KEY]),
model_tt, charsmax(model_tt),
body_tt, charsmax(body_tt),
model_ct, charsmax(model_ct),
body_ct, charsmax(body_ct),
time, charsmax(time)
) != 7) {
continue;
}
custom_player_models_register(data[ACCESS_KEY], model_tt, str_to_num(body_tt), model_ct, str_to_num(body_ct));
if(data[ACCESS_AUTH][0] == EOS) {
continue;
}
#if !defined STEAM_SUPPORT
if(data[ACCESS_AUTH][0] == '@') {
continue;
}
#endif
if(time[0] && systime >= parse_time(time, "%d.%m.%Y %H:%M")) {
continue
}
ArrayPushArray(g_Models, data);
}
fclose(file);
g_Size = ArraySize(g_Models);
}
public CBasePlayer_GetIntoGame_Post(const id) {
if(is_user_hltv(id)) {
return;
}
// for client_putinserver()
// redundant here? not sure about it
if(is_user_bot(id) && !is_entity(id)) {
RequestFrame("fix_bot", get_user_userid(id));
return;
}
set_load_player(id);
}
public CBasePlayer_SetClientUserInfoName_Post(const id, const infobuffer[], const new_name[]) {
RequestFrame("name_delay", id);
}
public name_delay(const id) {
if(is_user_alive(id) && is_entity(id)) { // is_entity() as botfix, can be redundant
set_load_player(id);
}
}
set_load_player(const id) {
new authid[MAX_AUTHID_LENGTH];
if(get_user_authid(id, authid, charsmax(authid))) {
load_player(id, authid);
}
}
public fix_bot(const userid) {
new id = find_player("k", userid);
if(id) {
load_player(id, "BOT");
}
}
load_player(id, const authid[]) {
new i, data[access_s], player_flags = get_user_flags(id);
new szName[MAX_NAME_LENGTH];
get_user_name(id, szName, charsmax(szName));
for( ; i < g_Size; i++) {
ArrayGetArray(g_Models, i, data);
switch(data[ACCESS_AUTH][0]) {
case '*': {
break;
}
#if defined STEAM_SUPPORT
case '@': {
if(is_user_steam(id)) {
break;
}
}
#endif
case 'S', 'V': {
if(strcmp(authid, data[ACCESS_AUTH], .ignorecase = true) == 0) {
break;
}
}
case '#': {
if(strcmp(szName, data[ACCESS_AUTH][1], .ignorecase = true) == 0) {
break;
}
}
default: {
if(player_flags & read_flags(data[ACCESS_AUTH])) {
break;
}
}
}
}
new szKey[CPM_MAX_MODEL_LENGTH];
new bool:bHas = custom_player_models_has(id, szKey, charsmax(szKey));
if(i != g_Size) {
if(!bHas || strcmp(szKey, data[ACCESS_KEY], .ignorecase = false) != 0) {
custom_player_models_set(id, data[ACCESS_KEY]);
}
} else if(bHas) {
custom_player_models_reset(id);
}
}
public plugin_end() {
if(g_Models != Invalid_Array) {
ArrayDestroy(g_Models);
}
}
#if defined DEBUG
public CmdRadio2(const id) {
if (custom_player_models_is_enable(id)) {
client_print_color(id, print_team_grey, "^4Models ^3disabled");
custom_player_models_enable(id, false);
} else {
client_print_color(id, print_team_blue, "^4Models ^3enabled");
custom_player_models_enable(id, true);
}
return PLUGIN_HANDLED;
}
public CmdRadio3(const id) {
new player;
get_user_aiming(id, player);
if (!is_user_connected(player)) {
client_print_color(id, print_team_red, "^3Player not found");
return PLUGIN_HANDLED;
}
if (custom_player_models_has(player)) {
client_print_color(id, print_team_grey, "^4Model ^3reseted");
custom_player_models_reset(player);
} else {
new data[access_s];
ArrayGetArray(g_Models, random_num(0, g_Size - 1), data);
custom_player_models_set(player, data[ACCESS_KEY]);
client_print_color(id, print_team_blue, "^4Model ^3setted ^4[%s]", data[ACCESS_KEY]);
}
return PLUGIN_HANDLED;
}
#endif
Помогите пожалуйста не работает модели но плагин работает