You should check that client is not invalid on line 111. Invalid being 0. Clients start from an index of 1. The IsValidClient() function does this, but you put GetClientTeam before the function checks.
PHP Code:
if (IsValidClient(attacker) && GetClientTeam(client) == 2 && IsPlayerTank(attacker))
Quote:
Note: Registers all playable classes (Hunter, Smoker, Boomer, Tank, Survivors). See infected_hurt for Witch and Common Infected
userid user ID who was hurt
attacker user id who attacked
attackerentid entity id who attacked, if attacker not a player, and userid therefore invalid
|
I'm assuming the userID can also be invalid, like the
player_death event. Bit cryptic if you ask me
Hope it helps
__________________