Yes, like that, though I prefer doing the check as soon as id is assigned to a value, so the plugin doesn't have to do unnecessary calculation, like:
PHP Code:
id = get_user_attacker(victim)
if(get_user_class(victim) != zClassId
|| !is_user_zombie(victim)
|| !is_user_connected(id))
return PLUGIN_CONTINUE
And for the other method, here's how:
PHP Code:
g_maxplayer = get_maxplayers()
if(!(1<=id<=g_maxplayer))
return PLUGIN_CONTINUE