Помощь в скриптинге

Nolkeeee

Пользователь
Регистрация
11 Июн 2017
Сообщения
1
Симпатии
0
Пол
Мужской
L 07/15/2018 - 11:43:08: [FAKEMETA] Invalid entity
L 07/15/2018 - 11:43:08: [AMXX] Displaying debug trace (plugin "azp_weapon_infity.amxx")
L 07/15/2018 - 11:43:08: [AMXX] Run time error 10: native error (native "get_pdata_int")
L 07/15/2018 - 11:43:08: [AMXX] [0] azp_weapon_infity.sma::fw_CmdStart (line 412)

L 07/15/2018 - 12:56:27: Start of error session.
L 07/15/2018 - 12:56:27: Info (map "zm_gorod_new") (file "addons/amxmodx/logs/error_20180715.log")
L 07/15/2018 - 12:56:27: [AMXX] Displaying debug trace (plugin "zombie_plague40_zlboss.amxx")
L 07/15/2018 - 12:56:27: [AMXX] Run time error 4: index out of bounds
L 07/15/2018 - 12:56:27: [AMXX] [0] zombie_plague40_zlboss.sma::native_get_user_zombie (line 8934)

L 07/15/2018 - 12:56:27: Unhandled dynamic native error
L 07/15/2018 - 12:56:27: [AMXX] Displaying debug trace (plugin "azp_damager_new.amxx")
L 07/15/2018 - 12:56:27: [AMXX] Run time error 10: native error (native "zp_get_user_zombie")
L 07/15/2018 - 12:56:27: [AMXX] [0] azp_damager_new.sma::event_damage (line 24)

1. Это все что связано со строкой (azp_weapon_infity.amxx)

Код:
public fw_CmdStart(id, uc_handle, seed)
{   
    if(!g_has_infi[id])
        return
        
    if(!is_user_alive(id))
        return   
 
    new pItem = get_pdata_cbase(id, OFFSET_ACTIVE_ITEM)
 
    if(get_pdata_int(pItem, m_iId, 4) != CSW_ELITE)
        return
 
    if(get_pdata_float(id, m_flNextAttack) > 0.0)
        return
 
    new szClip, szAmmo
    get_user_weapon(id, szClip, szAmmo)

    new iButtons = get_uc(uc_handle, UC_Buttons)
 
    if(!(iButtons & IN_ATTACK) && (iButtons & IN_ATTACK2))
    { 
        if(get_pdata_float(pItem, m_flNextSecondaryAttack, 4) <= 0.0)
        {
            if(get_pdata_int(pItem, m_iClip) <= 0)
                return
 
            g_mode[id] = 1
            ExecuteHamB(Ham_Weapon_PrimaryAttack, find_ent_by_owner(-1, "weapon_elite", id))
            new num
            num = random_num(1,2)
            if(num == 1)UTIL_PlayWeaponAnimation(id, szClip < 1 ? infi_SP_SHOOT_LAST : random_num(infi_SP_SHOOT_LEFT1, infi_SP_SHOOT_RIGHT1))
            if(num == 2)UTIL_PlayWeaponAnimation(id, szClip < 1 ? infi_SP_SHOOT_LAST : random_num(infi_SP_SHOOT_LEFT2, infi_SP_SHOOT_RIGHT2))
        }
    }
    else if(!(iButtons & IN_ATTACK2) && (iButtons & IN_ATTACK))
    {
        if(get_pdata_float(pItem, m_flNextSecondaryAttack, 4) <= 0.0)
        {
             if(get_pdata_int(pItem, m_iClip) <= 0)
                 return

             g_mode[id] = 0
        }
    }
}
2. zombie_plague40_zlboss.amxx

Код:
public native_get_user_zombie(id)
{
    return g_zombie[id];
}
3. azp_damager_new.amxx
Код:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>

public plugin_init()
{
    register_plugin("[ZP] Damager New", "0.1", "Nolkeee")
    
    register_dictionary("lvl_system_lang.txt")
      
    register_event("Damage", "event_damage", "b", "2!0", "3=0", "4!0")
    
    //RegisterHam(Ham_TakeDamage, "player", "fwham_TakeDamage")
}     

public event_damage(id)
{
    if (pev_valid(id))
    {
        new pid = get_user_attacker(id)
        
        if (zp_get_user_zombie(pid))
            return
        
        if (id == pid)
            return
        
        if (pev(pid, pev_flags) & FL_CLIENT)
        {
            client_print(pid, print_center, "%L", LANG_PLAYER, "SHOW_DAMAGE", read_data(2), get_user_health(id))
        }
    }
}
 
Сверху Снизу