No dmg with AWP

c0d3

Пользователь
Регистрация
16 Июн 2017
Сообщения
110
Симпатии
6
Пол
Мужской
Hello who can help me to fixed this error :
L 11/29/2020 - 17:22:06: [AMXX] Displaying debug trace (plugin "nodmgawp.amxx", version "1.1")
L 11/29/2020 - 17:22:06: [AMXX] Run time error 10: native error (native "get_user_weapon")
L 11/29/2020 - 17:22:06: [AMXX] [0] commnd-help.sma::fwdHamBlockAwpPre (line 52)
L 11/29/2020 - 17:40:51: Invalid player id 0

PHP:
 #include <amxmodx> #include <hamsandwich> #define BLOCK_TYPE 0 /*    0 - Блочит урон, но есть кровь. Легкий вариант.    1 - Блочит урон и кровь при попадании. Тяжелее 1-го способа. */ new Trie:g_tAuthIds; new bool:g_bBlockKill[33]; public plugin_init() {    register_plugin("No Dmg Awp", "1.1", "neugommon); #if BLOCK_TYPE == 0    RegisterHam(Ham_TakeDamage, "player", "fwdHamBlockAwpPre", false); #endif #if BLOCK_TYPE == 1    RegisterHam(Ham_TraceAttack, "player", "fwdHamBlockAwpPre", false); #endif     } public plugin_cfg() {    new fp = fopen("addons/amxmodx/configs/nodmg.ini", "rt");    if(!fp) set_fail_state("File ^"addons/amxmodx/configs/nodmg.ini^" nuk u gjet ose nuk u lexu!");    g_tAuthIds = TrieCreate();    new buff[25];    while(!feof(fp))    {        fgets(fp, buff, charsmax(buff));        trim(buff);        if(!buff[0] || buff[0] == ';') continue;        TrieSetCell(g_tAuthIds, buff, 0);    }    fclose(fp); } public client_putinserver(id) {    static sAuthId[25]; get_user_authid(id, sAuthId, charsmax(sAuthId));    g_bBlockKill[id] = TrieKeyExists(g_tAuthIds, sAuthId) ? true : false; } #if BLOCK_TYPE == 0 public fwdHamBlockAwpPre(pVictim, IdInflictor, pAttacker) #endif #if BLOCK_TYPE == 1 public fwdHamBlockAwpPre(pVictim, pAttacker) #endif    return (g_bBlockKill[pVictim] && get_user_weapon(pAttacker) == CSW_AWP) ? HAM_SUPERCEDE : HAM_IGNORED; public plugin_end() TrieDestroy(g_tAuthIds);
 
Сверху Снизу