Ok,what I did:
PHP Code:
public Event_Damage( victim )
{
new id
id = get_user_attacker( victim )
if( get_user_class( victim ) != zClassId
|| !is_user_zombie( victim )
|| !is_user_connected( id ) )
return PLUGIN_CONTINUE;
if(!(1<=id<=g_maxplayer))
return PLUGIN_CONTINUE
new Rand = random_num( 1, 100 )
if( Rand > 0 && Rand <= get_pcvar_num( DisarmChance ) )
{
CantFire[ id ] = true
Effects( id )
set_task( get_pcvar_float( DisarmTime ), "StopDisarmCc", id )
}
return PLUGIN_CONTINUE;
}
Do I need to write here in -public Event_Damage-?
PHP Code:
if(!(1<=id<=g_maxplayer))
return PLUGIN_CONTINUE