I'm trying to make Tanks only take damage from headshots in L4D, but it doesn't seem to work.
Here's what I have:
PHP Code:
public Action:Event_Player_Hurt(Handle:event, const String:name[], bool:dontBroadcast)
{
new userid = GetEventInt(event, "userid");
new client = GetClientOfUserId(userid);
decl String:model[40];
GetClientModel(client, model, 40);
if (!strcmp(model, "models/infected/hulk.mdl", false))
{
new hitgroup = GetEventInt(event, "hitgroup");
//Do 0 damage if
if (hitgroup != 1)
{
return Plugin_Handled;
}
}
return Plugin_Continue;
}
Any thoughts?
__________________