View Single Post
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 01-21-2021 , 05:48   Re: [STOCK] Custom kill message icons
Reply With Quote #4

PHP Code:

HookEvent
("player_death"Event_PlayerDeath_PreEventHookMode_Pre);

public 
void Event_PlayerDeath_Pre(Event event, const char[] namebool dontBroadcast
{
    if (
event.GetInt("attacker"))
    {
        
// kills made by traps
        
char weapon[256];
        
event.GetString("weapon"weaponsizeof(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");
__________________
Ilusion9 is offline