Перестали отображаться модели у игроков. Custom Player Models ver. 0.2.2

Статус
В этой теме нельзя размещать новые ответы.

fox

Сообщения
176
Реакции
49
Помог
7 раз(а)
Ошибка
[AMXX] Run time error 10 (plugin "custom_player_models_cfg.amxx") (native "custom_player_models_register")
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5219
Билд
ReHLDS version: 3.11.0.767-dev
ReGamedll
5.21.0.540-dev
Версия Metamod
Metamod v1.21p37
Список метамодулей
[ 1] SafeNameAndChat  RUN   -    SafeNameAndChat.  v1.1      ini   ANY   ANY  
[ 2] Reunion RUN - reunion_mm_i386. v0.1.92d ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 4] Rechecker RUN - rechecker_mm_i38 v2.5 ini Chlvl ANY
[ 5] VoiceTranscoder RUN - VoiceTranscoder. v2017RC5 ini ANY ANY
[ 6] AMX Mod X RUN - amxmodx.so v1.9.0.5 ini Start ANY
[ 7] ReSemiclip RUN - resemiclip.so v2.3.9 ini Chlvl ANY
[ 8] WHBlocker RUN - whblocker.so v1.5.696 ini Chlvl ANY
[ 9] ReSRDetector RUN - resrdetector.so v0.1.0 ini Chlvl ANY
[10] MySQL RUN - mysql_amxx_i386. v1.9.0.5 pl6 ANY ANY
[11] SQLite RUN - sqlite_amxx_i386 v1.9.0.5 pl6 ANY ANY
[12] IPHub Client RUN - iphubclient_amxx v1.0.1 pl6 ANY Never
[13] Admins Kit RUN - adminskit_amxx_i v1.0.2 pl6 ANY Never
[14] AuthEmu RUN - authemu_amxx_i38 v5.2.12. pl6 ANY Never
[15] ReAPI RUN - reapi_amxx_i386. v5.21.0. pl6 ANY Never
[16] GeoIP RUN - geoip_amxx_i386. v1.9.0.5 pl6 ANY ANY
[17] ReAimDetector RUN - reaimdetector_am v0.2.2 pl6 ANY Never
[18] FakeMeta RUN - fakemeta_amxx_i3 v1.9.0.5 pl6 ANY ANY
[19] CStrike RUN - cstrike_amxx_i38 v1.9.0.5 pl6 ANY ANY
[20] CURL AMXX RUN - curl_amxx_i386.s v1.1.1 pl6 ANY ANY
[21] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl6 ANY ANY
[22] Engine RUN - engine_amxx_i386 v1.9.0.5 pl6 ANY ANY
[23] Fun RUN - fun_amxx_i386.so v1.9.0.5 pl6 ANY ANY
Список плагинов
[  1] AuthEmu API             1.0         Dev-MS Team       authemu.amxx     running  
[ 2] Bypass Guard 1.0.1 mx?! bypass_guard.am running
[ 3] [BG] Provider: GeoIP 0.2 mx?! bg_provider_geo running
[ 4] [BG] Provider: IPHub-C 1.0 mx?! bg_provider_iph running
[ 5] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 6] Advanced Client Checke 0.3.6 Mistrick cmdchecker.amxx running
[ 7] Stop the Bastards 1.7.0 F@nt0M stop_the_bastar running
[ 8] Admin Loader 3.5 neygomon admin_loader.am running
[ 9] FreshBans 1.4.5b kanagava fresh_bans.amxx running
[ 10] ScreenMaker 1.1 neygomon screen_maker.am running
[ 11] Admin Chat 1.9.0.5249 AMXX Dev Team adminchat.amxx running
[ 12] Admin Commands 1.9.0.5219 AMXX Dev Team admincmd.amxx running
[ 13] Commands Menu 1.9.0.5219 AMXX Dev Team cmdmenu.amxx running
[ 14] Menus Front-End 1.5 neugomon menufront_end.a running
[ 15] Maps Menu 1.9.0.5219 AMXX Dev Team mapsmenu.amxx running
[ 16] Players Menu 1.9.0.5219 AMXX Dev Team plmenu.amxx running
[ 17] Restrict Weapons 1.9.0.5219 AMXX Dev Team restmenu.amxx running
[ 18] Admin Votes 1.9.0.5219 AMXX Dev Team adminvote.amxx running
[ 19] SF Warn Menu 0.1.4g serfreeman1337 sf_admin_warns. running
[ 20] VKCallAdmin 0.1 uMk0 vkcalladmin.amx running
[ 21] Show IP 1.0 $uicid3 amx_ip.amxx running
[ 22] VoteBan Menu 1.1 Author + ApXuTek VoteBan_Menu.am running
[ 23] Aim Realism 0.0.2 unnamed aim_realism.amx running
[ 24] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am running
[ 25] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 26] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 27] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 28] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 29] AES: StatsX 0.5.9 [REA serfreeman1337/s aes_statsx_cstr running
[ 30] CSXSQL: Onlinetime Awa 0.2 serfreeman1337 csstatsx_playti running
[ 31] Stats Configuration 1.9.0.5219 AMXX Dev Team statscfg.amxx running
[ 32] Lite Parachute 1.1 AcE, Leo_[BH] lite_parachute. running
[ 33] Screen Fade 1.0 Javekson screen_fade.amx running
[ 34] Anti DoubleDuck 1.7 Numb antidoubleduck. running
[ 35] Damager 2.0 Prayer damager.amxx running
[ 36] Reset Score 1.0 Javekson resetscore.amxx running
[ 37] Say me and Say hp 1.4 neygomon sayme.amxx running
[ 38] Weapon Use Pickup 1.2 PurposeLess weaponusepickup running
[ 39] Demo Recorder 2.4.1 F@nt0M demo_recorder.a running
[ 40] Recording Assistant 3.22 A3 Alcedema / Sa record.amxx running
[ 41] Map Spawns Editor 1.0.16 iG_os map_spawns_edit running
[ 42] [ReAPI] Vip System 1.4.1 Dager* *.* -G- re_vipka.amxx running
[ 43] Steam_GSClient_Bonus 1.0.5 ApXuTekToR Steam_GSClient_ running
[ 44] V.I.P Custom Weapons 1.0.0 Vaqtincha vip_custom.amxx running
[ 45] Hostage no death T 1.0 Brute hostage_no_deat running
[ 46] [ReAPI] Healthnade 0.0.2 F@nt0M reapi_healthnad running
[ 47] client_buy forward 0.1.1 ConnorMcLeod client_buy_forw running
[ 48] AWP Restrictions 1.5.1 Radius awp_restriction running
[ 49] Lite Kill Assist 1.17 neygomon lite_kill_assis running
[ 50] AFK Control ReNew 1.2(a) neygomon afk_control.amx running
[ 51] [182] High Ping Kicker 18.05.15 SKAJIbnEJIb hpk_rbs.amxx running
[ 52] Reklama 09.07.2019 mx?! reklama.amxx running
[ 53] [ReAPI] No Team Flash 0.0.2 Vaqtincha noteam_flash.am running
[ 54] Bomb Taker 0.0.1b Vaqtincha bomb_taker.amxx running
[ 55] Auto Team Balance Adva 1.5.1 Radius auto_team_balan running
[ 56] BS Creator 1.3 R3X bs_creator.amxx running
[ 57] unknown unknown unknown custome_buyzone running
[ 58] Free VIP 0.1 XTCS nightvip.amxx running
[ 59] Time Bonus 1.1 SKOBAR1K time_bonus.amxx running
[ 60] Trial Access 1.0.0 mx?! trial_access.am running
[ 61] Erotic Bomb 0.4 8dp & Spection erotic_bomb.amx running
[ 62] Bomb Timer 3.2 Twe3k erotic_bomb_hud running
[ 63] Crux Ansata 1.0 DUKKHAZ0R vodka.amxx running
[ 64] Simple Status Text: Sh 1.1 Leo_[BH] only_name_statu running
[ 65] [ReAPI] Slay Loosers 1.1 neugomon slaylosers.amxx running
[ 66] [RZ] Un-Stuck 1.6 NL)Ramon(NL unstuck.amxx running
[ 67] Top killer 1.3.2 uMk0 topkiller.amxx debug
[ 68] Lucky Defuser 1.0.1 iPlague lucky_defuser.a running
[ 69] Admin ESP 1.5b_mini KoST admin_esp_mini. running
[ 70] Unprecacher CSR 1.0 Leo_[BH] unprecacher_csr running
[ 71] Hats 1.5 Psycrow next21_hats.amx running
[ 72] Custom Player Models A 0.2.1 F@nt0M & BlackSi custom_player_m running
[ 73] Custom Player Models C 0.2.2 BlackSignature custom_player_m running
[ 74] Custom Player Models T 0.2.1 BlackSignature custom_player_m running
[ 75] Map Manager: Core 3.0.0 Mistrick map_manager_cor running
[ 76] Map Manager: Scheduler 0.1.0 Mistrick map_manager_sch running
[ 77] Map Manager: Rtv 0.0.4 Mistrick map_manager_rtv running
[ 78] Map Manager: Nominatio 0.0.8 Mistrick map_manager_nom running
[ 79] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 80] Map Manager: Effects 0.0.8 Mistrick map_manager_eff running
[ 81] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 82] Map Manager: Advanced 0.0.4 Mistrick map_manager_adv running
[ 83] V.I.P Custom KNIFE 1.0.0 Vaqtincha custom_knife.am running
[ 84] V.I.P Custom DEAGLE 1.0.0 Vaqtincha custom_deagle.a running
[ 85] V.I.P Custom M4A1 1.0.0 Vaqtincha custom_m4a1.amx running
[ 86] V.I.P Custom AK-47 1.0.0 Vaqtincha custom_ak47.amx running
[ 87] V.I.P Custom AWP 1.0.0 Vaqtincha custom_awp.amxx running
[ 88] ChatAdditions: Core v1.8.0 Sergey Shorokhov ChatAdditions_C running
[ 89] ChatAdditions: CSBans v1.8.0 Sergey Shorokhov CA_Storage_CSBa running
[ 90] CA: Mute v1.8.0 Sergey Shorokhov CA_Mute.amxx running
[ 91] CA Addon: Rank restric v1.8.0 steelzzz CA_Addon_RankRe running
[ 92] CA: VoteGAG 1.0.0-alph Sergey Shorokhov CA_Addon_VoteGa running
[ 93] CA: Gag v1.8.0 Sergey Shorokhov CA_Gag.amxx running
[ 94] Chat Manager 1.1.2-16+ Mistrick chatmanager.amx running
Автор плагина
BlackSignature
Версия плагина
0.2.2
Исходный код
#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
Перестали отображаться модели у игроков.
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
3,593
Реакции
1,576
Помог
141 раз(а)
fox, лог ошибки не полный.
 

fox

Сообщения
176
Реакции
49
Помог
7 раз(а)
11/06/2021 - 11:52:21: Error precache Player
L 11/06/2021 - 11:52:21: [AMXX] Displaying debug trace (plugin "custom_player_models_cfg.amxx", version "unknown")
L 11/06/2021 - 11:52:21: [AMXX] Run time error 10: native error (native "custom_player_models_register")
L 11/06/2021 - 11:52:21: [AMXX] [0] custom_player_models_cfg.sma::custom_player_models_init (line 69)
 
Сообщения
3,593
Реакции
1,576
Помог
141 раз(а)
fox, и приложите конфиг с моделями
 

fox

Сообщения
176
Реакции
49
Помог
7 раз(а)
Nordic Warrior,
; 'Custom Player Models CFG' plugin configuration file
;
; Format: "access" "key" "tt_model" "ct_model"
; Access can be:
; * - For all
; @ - For steam players
; STEAM_... or VALVE_... for access by authid
; Any other string - access flags ('any of' requirement)
;
; Examples:
; "STEAM_0:0:1234567" "splinter" "models/cpm/splinter_tt.mdl" "models/cpm/splinter_ct.mdl"
; "abcd" "krang" "models/cpm/krang_tt.mdl" "models/cpm/krang_ct.mdl"
; "@" "shreder" "models/cpm/shreder_tt.mdl" "models/cpm/shreder_ct.mdl"
; "*" "ninja_turtle" "models/cpm/ninja_turtle_tt.mdl" "models/cpm/ninja_turtle_ct.mdl"

"STEAM_0:0:48319203" "Solnce*" "models/cpm/Ledi_tt.mdl" "models/cpm/Ledi_ct.mdl"
"y" "Girls" "models/cpm/BL_ARCH.mdl" "models/cpm/police.mdl"
До обновления REHLDS и прочих компонентов, всё исправно работало :)
 
Сообщения
336
Реакции
414
Помог
7 раз(а)
11/06/2021 - 11:52:21: Error precache Player
L 11/06/2021 - 11:52:21: [AMXX] Displaying debug trace (plugin "custom_player_models_cfg.amxx", version "unknown")
L 11/06/2021 - 11:52:21: [AMXX] Run time error 10: native error (native "custom_player_models_register")
L 11/06/2021 - 11:52:21: [AMXX] [0] custom_player_models_cfg.sma::custom_player_models_init (line 69)
Судя по логу, плагин пытается загрузить модель с названием Player, но его либо нет либо я не знаю. Перепроверь конфиг и да тут в плагине есть поддержка конфига в двух местах, может ты забыл про это, "custom_player_models.ini" и "custom_player_models/models.ini", возможно у тебя два конфига.
 
Последнее редактирование:

fox

Сообщения
176
Реакции
49
Помог
7 раз(а)
Albertio, до обновления, всё исправно работало. По поводу конфигов, либо создается в папке "configs" либо в папке configs/plugins/ - ошибка не в этом.
6 Ноя 2021
BlackSignature о великий, приди.
 
Сообщения
94
Реакции
11
Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
fox, попробуй перезалить, и создать то что было ранее по своему хз
 
Сообщения
1,304
Реакции
2,303
Помог
57 раз(а)
fox, проверяем в каком виде сохранён конфиг. Я подозреваю что сохранился как UTF-8 BOM, а надо без BOM.
 

fox

Сообщения
176
Реакции
49
Помог
7 раз(а)
BlackSignature, кодировка правильная.В логах продолжает писать так же
L 11/06/2021 - 19:51:56: Error precache Player
L 11/06/2021 - 19:51:56: [AMXX] Displaying debug trace (plugin "custom_player_models_cfg.amxx", version "unknown")
L 11/06/2021 - 19:51:56: [AMXX] Run time error 10: native error (native "custom_player_models_register")
L 11/06/2021 - 19:51:56: [AMXX] [0] custom_player_models_cfg.sma::custom_player_models_init (line 69)
 
Сообщения
1,304
Реакции
2,303
Помог
57 раз(а)
fox, конфиг в архив и мне в ЛС, или в телегу. Именно файлом.
 
Сообщения
1,304
Реакции
2,303
Помог
57 раз(а)
До обновления REHLDS и прочих компонентов, всё исправно работало :)
Код:
"STEAM_0:0:48319203" "Solnce*" "models/cpm/Ledi_tt.mdl" "models/cpm/Ledi_ct.mdl"
"y" "Girls" "models/cpm/BL_ARCH.mdl" "models/cpm/police.mdl"
Код:
        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;
        }
6a9d0ecd0a3113e53e960638184e018e.jpg
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу