or with this. Got it from wrecked to.
PHP Code:
#define IsPlayer(%1) (1 <= %1 <= g_max_players)
new g_max_players
public plugin_init()
g_max_players = get_maxplayers();
function(victim, attacker)
{
if(IsPlayer(attacker))
{
// Attacker is player
}
}
This may be easier to use.
__________________