Use return Plugin_Handled for the OnTakeDamage hook.
PHP Code:
if (victim > 0 && victim <= MaxClients && IsClientInGame(victim) && IsPlayerAlive(victim)) // you don't have to check for all these. I just personally like doing this.
{
damage = 0.0;
return Plugin_Handled; // returning Plugin_Handled basically zeroes out all damage.
}
return Plugin_Continue; // you can return Plugin_Changed as well.
I'm unable to provide a better example at the moment.
__________________