Code:
if(get_user_team(killer) != get_user_team(victim))
return HAM_IGNORED
if(!is_user_bot(killer))
return HAM_IGNORED
if(victim == killer)
return HAM_IGNORED
I would use this order:
Check if the killer is the victim.
Check if the killer is not a bot.
Check if the killer and the victim are on different teams.
Code:
if(victim == killer || !is_user_bot(killer) || get_user_team(killer) != get_user_team(victim))
return HAM_IGNORED;
Reasoning:
1st check doesn't use any natives, only variable checks.
2nd check only uses 1 native.
3rd check uses 2 natives.
__________________