Something like this...
Code:
public void OnClientPutInServer(int client)
{
SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
}
public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype, int &weapon, float damageForce[3], float damagePosition[3])
{
if (IsValidClient(victim) && IsClientInGame(victim) && GetClientTeam(victim) == 3)
{
if (GetEntProp(victim, Prop_Send, "m_zombieClass") == 8 && damage > float(GetEntProp(victim, Prop_Data, "m_iHealth")))
ForcePlayerSuicide(victim);
}
}
stock bool IsValidClient(int client)
{
return (client > 0 && client <= MaxClients);
}
You can also check for MoveType Ladder but in all honesty I dont think it will matter, this will always guarantee the tank dies when taking more damage than health. You'd have to test this because forcing suicide on a ledge may look weird, or not, i dunno...Also survivors have the entprop isfallingfromledge, not sure if the tanks one will work but if there is an issue killing it during the climb it may be necessary to set that as well.