Run time error 10: native error (native "client_print")

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
61
Реакции
9
Помог
1 раз(а)
Ошибка
[AMXX] Run time error 10: native error (native "client_print")
L 11/22/2023 - 20:39:19: [AMXX] [0] zp_showZmHp.sma::event_damage (line 13)
L 11/22/2023 - 20:39:20: Invalid player id 132
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5294 (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: Dec 3 2021 15:54:56
Built from: https://github.com/alliedmodders/amxmodx/commit/363871a
Build ID: 5294:363871a
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.22.0.593-dev
Build date: 03:10:30 Jul 11 2023
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/e1d1c11
Версия 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
Список метамодулей
[ 1] Reunion               RUN   -    reunion.so                  v0.1.0.137       ini  Start Never
[ 2] AMX Mod X RUN - amxmodx.so v1.9.0.5294 ini Start ANY
[ 3] Revoice RUN - revoice.so v0.1.0.34 ini Start Never
[ 4] SafeNameAndChat RUN - safenameandchat.so v1.1 ini ANY
[ 5] ReSemiclip RUN - resemiclip.so v2.3.9 ini ANY
[ 6] Ultimate Unprecacher RUN - ultimate_unprecacher.so vBeta 2.5.3 ini Chlvl Chlvl
[ 7] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5294 pl2 ANY
[ 8] CSX RUN - csx_amxx_i386.so v1.9.0.5294 pl2 ANY
[ 9] ReAPI RUN - reapi_amxx_i386.so v5.22.0.254-dev pl2 ANY Never
[10] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5294 pl2 ANY ANY
[11] MySQL RUN - mysql_amxx_i386.so v1.9.0.5294 pl2 ANY ANY
[12] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl2 ANY Never
[13] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5294 pl2 ANY ANY
[14] Fun RUN - fun_amxx_i386.so v1.9.0.5294 pl2 ANY ANY
[15] Engine RUN - engine_amxx_i386.so v1.9.0.5294 pl2 ANY ANY
[16] SQLite RUN - sqlite_amxx_i386.so v1.9.0.5294 pl2 ANY ANY
16 plugins, 16 running
Список плагинов
[  1] Bypass Guard            1.0.1       mx?!              bypass_guard.am  running  
[ 2] Admin Loader 3.5 neygomon admin_loader.am running
[ 3] FreshBans 1.4.8b kanagava fresh_bans.amxx running
[ 4] Admin Chat 1.9.0.5294 AMXX Dev Team adminchat.amxx running
[ 5] Admin Commands 1.9.0.5294 AMXX Dev Team admincmd.amxx running
[ 6] Commands Menu 1.9.0.5294 AMXX Dev Team cmdmenu.amxx running
[ 7] [Customizable] AmxModM 0.0.5 Albertio amxmodmenu.amxx running
[ 8] Maps Menu 1.9.0.5294 AMXX Dev Team mapsmenu.amxx running
[ 9] Players Menu 1.9.0.5294 AMXX Dev Team plmenu.amxx running
[ 10] Plugin Menu 1.9.0.5294 AMXX Dev Team pluginmenu.amxx running
[ 11] Teleport Menu 1.9.0.5294 AMXX Dev Team telemenu.amxx running
[ 12] Scrolling Message 1.9.0.5294 AMXX Dev Team scrollmsg.amxx running
[ 13] Admin Votes 1.9.0.5294 AMXX Dev Team adminvote.amxx running
[ 14] CS Misc. Stats 1.9.0.5294 AMXX Dev Team miscstats.amxx running
[ 15] CS Stats Logging 1.9.0.5294 AMXX Dev Team stats_logging.a running
[ 16] Stats Configuration 1.9.0.5294 AMXX Dev Team statscfg.amxx running
[ 17] Change Game Name 1.2 ReHLDS Team change_game_nam running
[ 18] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 19] Reklama 20.05.2020 mx?! reklama.amxx running
[ 20] Map Manager: Core 3.1.5 Mistrick map_manager.amx running
[ 21] [GM] AntiAdv 0.0.2 [GM] NWC gm_antiadv.amxx running
[ 22] Yet Another Voteban 1.51 AndrewZ & noskil yet_another_vot running
[ 23] [ZP] Core/Engine 5.0.8 ZP Dev Team zp50_core.amxx running
[ 24] [AMXX] Settings API 1.0 MeRcyLeZZ amx_settings_ap running
[ 25] [CS] Player Models API 1.2 WiLS cs_player_model running
[ 26] [CS] Teams API 1.2 WiLS cs_teams_api.am running
[ 27] [CS] MaxSpeed API 1.0 WiLS cs_maxspeed_api running
[ 28] [CS] Weapon Models API 1.1 WiLS cs_weap_models_ running
[ 29] [CS] Weapons Restrict 0.4 WiLS cs_weap_restric running
[ 30] [CS] Ham Hooks for Bot 1.0 WiLS cs_ham_bots_api running
[ 31] [ZP] Class: Zombie 5.0.8 ZP Dev Team zp50_class_zomb running
[ 32] [ZP] Class: Human 5.0.8 ZP Dev Team zp50_class_huma running
[ 33] [ZP] Class: Nemesis 5.0.8 ZP Dev Team zp50_class_neme running
[ 34] [ZP] Class: Survivor 5.0.8 ZP Dev Team zp50_class_surv running
[ 35] [ZP] Class: Zombie: Cl 5.0.8 ZP Dev Team zp50_class_zomb running
[ 36] [CSO Like] ZClass: Hea 0.2 | 03.0 inf (nimroK) cso_zclass_heav running
[ 37] [ZP] Invisible Zombie 1.0 Fry! zp_class_invisi running
[ 38] [ZP 4.3] ZClass: Regen 1.1 ImmortalAmxx amxxclassregene running
[ 39] [ZP] Wallclimb 1.0 WallClimb by Pyt zp_class_climb. running
[ 40] [ZP] CROW ZOMBIE 1.0 v3x+Roadrage zp_class_crow.a running
[ 41] [ZP] Zombie Class: Cer 0.1 DJHD! zp_zclass_cerbe running
[ 42] [ZP] SMOKER ZOMBIE 1.0 Mr.Best zp_class_smoker running
[ 43] [ZP] Class: x-Voodoo 2019 | 1.0 xUnicorn (t3rkec zp_zclass_voodo running
[ 44] [ZP] Class : BunnyHop 1.1 ?a?es? zp_zclass_bhzom running
[ 45] [ZP] Class: Zombie: An 1.0.0 Excalibur.007 zp50_class_zomb running
[ 46] [ZP] Respawn Zombie Cl 5.0 CHyC/PomanoB zp_zombie_respa running
[ 47] [ZP] Zombie Class: KF 0.2 meTaLiCroSS zp_zclass_siren running
[ 48] [ZP | AMXX] Sting Fing 0/0/2 m0rt3m zp_class_sting_ running
[ 49] [ZP Class] Flying Zomb 0.1 ONYX xman2030_flying running
[ 50] [ZP] Zombie Class: Thi 1.1 BaRSiK zp_zombie_class running
[ 51] [ZP] ZClass: Chaser 1.0 R1CHICOREJZ zp_zclass_chase running
[ 52] [ZP] Class : Execution 1.0.0 schmurgel1983 zp_class_execut running
[ 53] [ZP] Class: Human: Cla 5.0.8 ZP Dev Team zp50_class_huma running
[ 54] [ZP] Human Armor 5.0.8 ZP Dev Team zp50_human_armo running
[ 55] [ZP] Game Modes Manage 5.0.8 ZP Dev Team zp50_gamemodes. running
[ 56] [ZP] Game Mode: Infect 5.0.8 ZP Dev Team zp50_gamemode_i paused
[ 57] [ZP] Game Mode: Multip 5.0.8 ZP Dev Team zp50_gamemode_m paused
[ 58] [ZP] Game Mode: Swarm 5.0.8 ZP Dev Team zp50_gamemode_s paused
[ 59] [ZP] Game Mode: Nemesi 5.0.8 ZP Dev Team zp50_gamemode_n paused
[ 60] [ZP] Game Mode: Surviv 5.0.8 ZP Dev Team zp50_gamemode_s paused
[ 61] [ZP] Game Mode: Plague 5.0.8 ZP Dev Team zp50_gamemode_p paused
[ 62] [ZP] Game Mode: Armage 5.0.8 ZP Dev Team zp50_gamemode_a paused
[ 63] [ZP] Items Manager 5.0.8 ZP Dev Team zp50_items.amxx running
[ 64] [ZP] Items Manager: Am 5.0.8 ZP Dev Team zp50_items_ammo running
[ 65] [ZP] Item: Weapons 5.0.8 ZP Dev Team zp50_item_weapo running
[ 66] [ZP] Item: Nightvision 5.0.8 ZP Dev Team zp50_item_night running
[ 67] [ZP] Item: Antidote 5.0.8 ZP Dev Team zp50_item_antid running
[ 68] [ZP] Item: Zombie Madn 5.0.8 ZP Dev Team zp50_item_zombi running
[ 69] [ZP] Item: Infection B 5.0.8 ZP Dev Team zp50_item_infec running
[ 70] [ZP] Admin Commands 5.0.8 ZP Dev Team zp50_admin_comm running
[ 71] [ZP] Admin Menus 5.0.8 ZP Dev Team zp50_admin_menu running
[ 72] [ZP] Admin Models 5.0.8 ZP Dev Team zp50_admin_mode running
[ 73] [ZP] Custom Buy Menus 5.0.8 ZP Dev Team zp50_buy_menus. running
[ 74] [ZP] Buyzones 5.0.8 ZP Dev Team zp50_buy_zones. running
[ 75] [ZP] Rewards: Ammo Pac 5.0.8 ZP Dev Team zp50_rewards_am running
[ 76] [ZP] Rewards: Frags & 5.0.8 ZP Dev Team zp50_rewards_fr running
[ 77] [ZP] Deathmatch 5.0.8 ZP Dev Team zp50_deathmatch running
[ 78] [ZP] Random Spawning 5.0.8 ZP Dev Team zp50_random_spa running
[ 79] [ZP] Zombie Features 5.0.8 ZP Dev Team zp50_zombie_fea running
[ 80] [ZP] Zombie Sounds 5.0.8 ZP Dev Team zp50_zombie_sou running
[ 81] [ZP] Zombie Damage 5.0.8 ZP Dev Team zp50_zombie_dam running
[ 82] [ZP] Human Unlimited A 5.0.8 ZP Dev Team zp50_human_ammo running
[ 83] [ZP] Flashlight 5.0.8 ZP Dev Team zp50_flashlight running
[ 84] [ZP] Nightvision 5.0.8 ZP Dev Team zp50_nightvisio running
[ 85] [ZP] Leap/Longjump 5.0.8 ZP Dev Team zp50_leap.amxx running
[ 86] [ZP] Pain Shock Free 5.0.8 ZP Dev Team zp50_painshockf running
[ 87] [ZP] Knockback 5.0.8 ZP Dev Team zp50_knockback. running
[ 88] [ZP] Weapon Drop/Strip 5.0.8 ZP Dev Team zp50_weapon_dro running
[ 89] [ZP] Effects: Infect 5.0.8 ZP Dev Team zp50_effects_in running
[ 90] [ZP] Effects: Cure 5.0.8 ZP Dev Team zp50_effects_cu running
[ 91] [ZP] Effects: Lighting 5.0.8 ZP Dev Team zp50_effects_li running
[ 92] [ZP] Ambience Effects 5.0.8 ZP Dev Team zp50_ambience_e running
[ 93] [ZP] Ambience Sonds 5.0.8 ZP Dev Team zp50_ambience_s running
[ 94] [ZP] Main Menu 5.0.8 ZP Dev Team zp50_main_menu3 running
[ 95] [ZP] Objective Remover 5.0.8 ZP Dev Team zp50_objective_ running
[ 96] [ZP] Gameplay Fixes 5.0.8 ZP Dev Team zp50_gameplay_f running
[ 97] [ZP] Team Scoring 5.0.8 ZP Dev Team zp50_team_scori running
[ 98] [ZP] HUD Information 5.0.8 ZP Dev Team zp50_hud_info.a running
[ 99] [ZP] Ammo Packs 5.0.8 ZP Dev Team zp50_ammopacks. running
[100] [ZP] Grenade: Fire 5.0.8 ZP Dev Team zp50_grenade_fi running
[101] [ZP] Grenade: Frost 5.0.8 ZP Dev Team zp50_grenade_fr running
[102] [ZP] Grenade: Flare 5.0.8 ZP Dev Team zp50_grenade_fl running
[103] [ZP] ZP 4.3 Subplugin 5.0.8 ZP Dev Team zp50_zp43_compa running
[104] [ZP43] Extra item: Gas 3.0 H.RED.ZONE zp43_gas_mask.a running
[105] ZP Countdown Vox 0.0.1 wbyokomo zp_vox_countdow running
[106] Player Name 0.9.2 default zp_player_name. running
[107] [ZP] Extra Item: No Re 0.1.0 fezh zp_extra_no_rec running
[108] [ZP] Extra Item: Multi 1.0 pharse zp_extra_multij running
[109] [ZP] Extra Item: Knife 1.2 pharse & sexy2x7 zp_extra_knife_ running
[110] [ZP] Donate Plugin 1.0 @bdul! zp_donate_ammo_ running
[111] Amx Dodge 0.1.0 PomanoB zp_dodge_human. running
[112] [ZP] Buy Health Points 1.0 T[h]E Dis[as]teR zp_buyhp_limitZ running
[113] [ZP] Buy Health Points 1.0 T[h]E Dis[as]teR zp_buyhp_limitH running
[114] [ZP] Extra: Anti-Infec 1.0 MeRcyLeZZ zp_buyArmorLimi running
[115] ZP AP Store 0.0.1 wbyokomo zp_ap_store.amx running
[116] [ZP] Extra: Unlimited 1.0 MeRcyLeZZ zp_extra_unlimi running
[117] [ZP] LaserMine 2.8.1 SandStriker / Sh zp_lasermine_28 running
[118] ZP: Show Victim HP On D 1.0 <VeCo> zp_showZmHp.amx debug
[119] [ZP] Addon: Display th 0.1.6 meTaLiCroSS round.amxx running
[120] [ZP] WPN Minigun 1.65 CLLlAgOB zp_extra_minigu running
[121] [ZP] Extra Item: Gauss 0.6 meTaLiCroSS zp_extra_gauss. running
[122] ZM VIP 1.9.1 BETA aaarnas zm_vip.amxx running
[123] NadeModes 11.2 Nomexous & OT nademodes.amxx running
[124] [ZP: Respawn Menu] 0.1 3BEPb zp_respawn_ammo running
[125] [ZP] Item: Antidote Bo 5.0.8 ZP Dev Team zp50_item_antid running
[126] [ZP] Addon: Extended G 2.0 [ru]In1ernal Err zp_ammo_ex.amxx running
[127] [ZP] Extra Drag 0.1 4eRT zp_extra_drag_a running
[128] PLUGIN VERSION AUTHOR zp_lighting_vot running
[129] Perfect Camera 0.2.5 Nordic Warrior PerfectCamera.a running
[130] Glowsticks [ZP] 1.0 Leo_[BH] zp_glowsticks.a running
[131] [ZP 4.3/ ReAPI] ExtraI 0.0.3 Base Code: F@nt0 zp43_extraitem_ running
[132] Map Manager: Core 3.2.1 Mistrick map_manager_cor running
[133] Map Manager: Scheduler 0.1.10 Mistrick map_manager_sch running
[134] Map Manager: Rtv 0.1.1 Mistrick map_manager_rtv running
[135] Map Manager: Nominatio 0.2.1 Mistrick map_manager_nom running
[136] Map Manager: Effects 0.1.1 Mistrick map_manager_eff running
[137] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[138] Map Manager: Sounds 0.0.2 Mistrick map_manager_sou running
[139] ChatAdditions: Core v1.9.1 Sergey Shorokhov ChatAdditions_C running
[140] ChatAdditions: SQLite v1.9.1 Sergey Shorokhov CA_Storage_SQLi running
[141] CA: Anti Flood v1.9.1 Nordic Warrior CA_AntiFlood.am running
[142] CA: Mute v1.9.1 Sergey Shorokhov CA_Mute.amxx running
[143] CA: VoteGAG 1.0.0-alph Sergey Shorokhov CA_Addon_VoteGa running
[144] CA Addon: Request UnGA v1.9.1 steelzzz CA_Addon_Reques running
[145] CA: Gag v1.9.1 Sergey Shorokhov CA_Gag.amxx running
145 plugins, 138 running
Автор плагина
Yakess
Версия плагина
1.0
Исходный код
#include <amxmodx>
#include <zombieplague>

public plugin_init() {
register_plugin("ZP: Show Victim HP On Damage", "1.0", "<VeCo>")
register_event("Damage","event_damage","b","2!0","3=0","4!0")
}

public event_damage(id)
{
new killer = get_user_attacker(id)
if(zp_get_user_zombie(id))
client_print(killer,print_center,"hp %i",get_user_health(id))
}
Суть плагина - когда стреляешь в зомби, то тебе в центре экрана показывает его хп
Находил несколько таких плагинов, но везде эта ошибка в консоле присутствует. Погуглил - ничего для себя не нашел как пофиксить это


Код:
L 11/22/2023 - 20:39:24: [AMXX]    [0] zp_showZmHp.sma::event_damage (line 13)
L 11/22/2023 - 20:39:25: Invalid player id 132
L 11/22/2023 - 20:39:25: [AMXX] Displaying debug trace (plugin "zp_showZmHp.amxx", version "1.0")
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
1,082
Реакции
58
Помог
11 раз(а)
zmuser, перед тем как получить здоровье жертвы через функцию get_user_health(id), игрок успел выйти с сервера. Нужно сделать проверку на коннект игрока!
Код:
#include <amxmodx>
#include <zombieplague>

public plugin_init() {
    register_plugin("ZP: Show Victim HP On Damage", "1.0", "<VeCo>");
    register_event("Damage","event_damage","b","2!0","3=0","4!0");
}

public event_damage(id) {
    if(!is_user_connected(id))
        return;
      
    new killer = get_user_attacker(id);
  
    if(zp_get_user_zombie(id))
        client_print(killer, print_center, "hp %i", get_user_health(id));
}
 
Сообщения
397
Реакции
221
Помог
13 раз(а)
zmuser,

Код:
/**
    0.1 (23.11.2023) by b0t.
        - Релиз;
*/
new const VERSION[] = "0.1";
#include <amxmodx>
#include <zombieplague>
#include <reapi>
public plugin_init() {
    register_plugin("ZM: Show zombie hp",VERSION,"b0t.");
    RegisterHookChain(RG_CBasePlayer_TakeDamage,"CBasePlayer_TakeDamage_Post", .post = true);
}
public CBasePlayer_TakeDamage_Post(const pVictim,const iInflictor,const pAttacker) {
    if(!is_user_connected(pAttacker))
        return;
    
    if(zp_get_user_zombie(pVictim))
        client_print(pAttacker,print_center,"hp %i",floatround(Float:get_entvar(pVictim,var_health)));
}

Код:
/**
    0.1 (23.11.2023) by b0t.
        - Релиз;
*/
new const VERSION[] = "0.1";
#include <amxmodx>
#include <zombieplague>
#include <hamsandwich>
#include <fakemeta>
public plugin_init() {
    register_plugin("ZM: Show zombie hp",VERSION,"b0t.");
    RegisterHam(Ham_TakeDamage,"player","Ham_TakeDamage_Post",true);
}
public Ham_TakeDamage_Post(const pVictim,const iInflictor,const pAttacker) {
    if(!is_user_connected(pAttacker))
        return;
    
    if(zp_get_user_zombie(pVictim))
        client_print(pAttacker,print_center,"hp %i",floatround(Float:pev(pVictim,pev_health)));
}
 

Download all Attachments

Сообщения
1,082
Реакции
58
Помог
11 раз(а)
b0t.,
Самое интересное, эта тема обсуждалась миллион раз, даже забить в поисковик трудно
 
Сообщения
397
Реакции
221
Помог
13 раз(а)
Code_0xABC,

Как выяснилось, и не раз, многие не умеют им пользоваться
 
Сообщения
1,082
Реакции
58
Помог
11 раз(а)
b0t., кстате, тебе тоже ошибка прилетит, ты получаешь здоровье жертвы floatround(Float:get_entvar(pVictim,var_health)), а на коннект проверяешь атакующего
 
Последнее редактирование модератором:
Сообщения
397
Реакции
221
Помог
13 раз(а)
Code_0xABC, В какой момент. Отметь в коде.
23 Ноя 2023
Code_0xABC, ну так это логично... Форвард получения урона в post, т.е. после того как игрок получил урон.
Атакующий может кинуть гранату и выйти, а вот жертва не сможет сначала выйти с сервера, а уже после получить урон
 
Сообщения
397
Реакции
221
Помог
13 раз(а)
Code_0xABC, не логично :)
Сколько не смотрели, всё прекрасно, даже если игрок подвисает.
А вот проверить находиться ли атакующий на сервере стоит. Опять же пример с гранатой
 
Сообщения
1,082
Реакции
58
Помог
11 раз(а)
b0t., Обьясни, не смотрел, client_print через мессагу отсылается? Если шлется через MSG_BROADCAST и MSG_ONE_UNRELIABLE , то какой смысл проверять игрока на коннект (атакующего), и ошибка я считаю прилетела со стороны жертвы, подвис и держи еррорку. В его варианте, нужно проверить жертву, в твоем варианте, я думаю она не прилетит даже, если не проверить ни жертву на атакующего.
23 Ноя 2023
Ну не могу точно сказать конечно, не смотрел как работает client_print
 
Последнее редактирование:
Сообщения
1,082
Реакции
58
Помог
11 раз(а)
b0t., хотя забираю слова обратно по поводу client_print, требуется проверка на коннект аттакующего
Error
If a single client is specified and the index is not within
the range of 1 to MaxClients, an error will be thrown.
BiZaJe, Спасибо, посмотрел
Код:
if (pEntity)
    MESSAGE_BEGIN(MSG_ONE, gmsgTextMsg, NULL, pEntity);
else
    MESSAGE_BEGIN(MSG_BROADCAST, gmsgTextMsg);
 
Сообщения
61
Реакции
9
Помог
1 раз(а)
Спасибо за решение! Не знал какое решение отметить, отметил первое
На счёт поиска по форуму - что-то не подумал, в гугле полазил, думал и от сюда он ответы предложит, но нет
 
Сообщения
1,082
Реакции
58
Помог
11 раз(а)
zmuser, если ты выбрал первый вариант, то там тогда требуется еще проверка, а то сообщение тоже выдаст ошибку, если игрок кинет гранату и выйдет. Добавь между 13 и 14 строкой
Код:
++ if(!is_user_connected(killer)) return;
 
Сообщения
61
Реакции
9
Помог
1 раз(а)
Code_0xABC, хорошо
Спасибо большое Code_0xABC и b0t. за помощь
Лайки не могу ставить, к сожалению(
 
Сообщения
1,082
Реакции
58
Помог
11 раз(а)
zmuser,
дело не в лайках, достаточно спасибо
 
Статус
В этой теме нельзя размещать новые ответы.

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

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