PHP Code:
HookEvent("player_death", Event_PlayerDeath_Pre, EventHookMode_Pre);
public void Event_PlayerDeath_Pre(Event event, const char[] name, bool dontBroadcast)
{
if (event.GetInt("attacker"))
{
// kills made by traps
char weapon[256];
event.GetString("weapon", weapon, sizeof(weapon));
if (StrEqual(weapon, "point_hurt", true) || StrEqual(weapon, "worldspawn", true))
{
event.SetString("weapon", "breachcharge_projectile");
}
}
}
You can do this, it's cleaner than how you do.
For that icon to work, the setting should be: event.SetString("weapon", "fall");
__________________