public OnPluginStart()
{
HookEvent("player_hurt", Event_PlayerHurt);
}
public Event_PlayerHurt(Handle:event, const String:name[], bool:dontBroadcast)
{
new damagetype = GetEventInt(event, "type");
if (damagetype & DMG_CLUB || damagetype & DMG_SLASH)
{
new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
if (attacker == 0 || !IsClientInGame(attacker) || GetClientTeam(attacker) != 2 || IsFakeClient(attacker)) return;
new victim = GetClientOfUserId(GetEventInt(event, "userid"));
if (victim == 0 || !IsClientInGame(victim) || GetClientTeam(victim) != 3) return;
new class = GetEntProp(victim, Prop_Send, "m_zombieClass");
new damage = GetEventInt(event, "dmg_health");
new health = GetEventInt(event, "health");
PrintToChat(attacker, "victim %N%s, class %d, damage %d, health %d, type %d", victim, (IsFakeClient(victim) ? " (bot)" : ""), class, damage, health, damagetype);
}
}
*if (damagetype & DMG_CLUB || damagetype & DMG_SLASH)
может еще какие то типы урона есть на рукопахе, я не знаю точно