Something like this? ( do not know how to do it 1<=id<=maxplayer )
PHP Code:
public Event_Damage( victim )
{
new id
id = get_user_attacker( victim )
if( get_user_class( victim ) != zClassId
|| !is_user_zombie( victim ) )
return PLUGIN_CONTINUE;
new Rand = random_num( 1, 100 )
if( Rand > 0 && Rand <= get_pcvar_num( DisarmChance ) && is_user_connected(id) )
{
CantFire[ id ] = true
Effects( id )
set_task( get_pcvar_float( DisarmTime ), "StopDisarmCc", id )
}
return PLUGIN_CONTINUE;
}