Hello, i always get this error/warning thing when i play on the server
PHP Code:
L 08/29/2020 - 19:07:42: Invalid player id 0
L 08/29/2020 - 19:07:42: [AMXX] Displaying debug trace (plugin "VIP.amxx")
L 08/29/2020 - 19:07:42: [AMXX] Run time error 10: native error (native "get_user_attacker")
L 08/29/2020 - 19:07:42: [AMXX] [0] VIP.sma::Damage (line 53)
I modified the code to my like, and this is what happens,
can anynone help me?
PHP Code:
public Damage(id)
{
new weapon, hitpoint, attacker = get_user_attacker(id,weapon,hitpoint)
if(attacker<=maxplayers && is_user_alive(attacker) && attacker!=id && is_user_connected(attacker)) // - this is the line i get errors on
if (get_user_flags(attacker) & ADMIN_LEVEL_H)
{
new money = read_data(2) * get_pcvar_num(mpd)
if(hitpoint==1) money += get_pcvar_num(mhb)
cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
}
}