Added hitgroup API, and logging values for it. Knockback module is done.

This commit is contained in:
Greyscale
2009-04-15 03:24:02 +02:00
parent 648a875c14
commit e7ace94625
10 changed files with 236 additions and 40 deletions

View File

@ -240,13 +240,15 @@ public Action:PlayerHurt(Handle:event, const String:name[], bool:dontBroadcast)
new index = GetClientOfUserId(GetEventInt(event, "userid"));
new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
new hitgroup = GetEventInt(event, "hitgroup");
new dmg_health = GetEventInt(event, "dmg_health");
decl String:weapon[32];
GetEventString(event, "weapon", weapon, sizeof(weapon));
// Forward event to modules.
KnockbackPlayerHurt(index, attacker, weapon, dmg_health);
KnockbackPlayerHurt(index, attacker, weapon, hitgroup, dmg_health);
// Check if the attacker is a player.
if (attacker != 0)