I have this code
PHP Code:
public plugin_init()
{
RegisterHam(Ham_TakeDamage,"func_wall","fw_TakeDamage");
}
public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
{
//Victim is not lasermine.
new sz_classname[32]
entity_get_string( victim , EV_SZ_classname , sz_classname , 31 )
if( !equali(sz_classname,"amxx_pallets") )
return HAM_IGNORED;
//Attacker is zombie
if( zp_get_user_zombie( attacker )&& is_user_alive( inflictor ) )
return HAM_IGNORED;
//Block Damage
return HAM_SUPERCEDE;
}
An player put in zombie mode sanbags and zombie can destroy this sandbags and another player human coming and shot in the sandabgs he cant destroy but I want the player who put the sandbags to make can destroy sandbags I put there && is_user_alive( inflictor ) but not working why?