View Single Post
pr0mers
Junior Member
Join Date: May 2020
Old 08-11-2021 , 04:56   Re: [HELP]Trying to do custom kill feed icons
Reply With Quote #4

Quote:
Originally Posted by kratoss1812 View Post
You have to stop the broadcast of the initial event, then create a new one and send it to everyone.

Credits to "Patriot of Anarchy" from HLMod.

PHP Code:
public Action Event_Death(Event event, const char[] namebool dontBroadcast)
{
    
int iClient GetClientOfUserId(event.GetInt("attacker"));
    if(!
iClient)
        return 
Plugin_Continue;

    
event.BroadcastDisabled true;

    
char buffer[124];
    
Event fake CreateEvent("player_death"true);
    
fake.SetInt("userid",            event.GetInt("userid"));
    
fake.SetInt("attacker",            event.GetInt("attacker"));
    
fake.SetInt("assister",            event.GetInt("assister"));

    
fake.SetString("weapon"buffer);

    
fake.SetInt("dominated",        event.GetInt("dominated"));
    
fake.SetInt("revenge",            event.GetInt("revenge"));
    
fake.SetInt("wipe",                event.GetInt("wipe"));
    
fake.SetInt("penetrated",        event.GetInt("penetrated"));
    
fake.SetBool("noreplay",        event.GetBool("noreplay"));

    
fake.SetBool("assistedflash",    event.GetBool("assistedflash"));
    
fake.SetBool("headshot",        event.GetBool("headshot"));
    
fake.SetBool("thrusmoke",        event.GetBool("thrusmoke"));
    
fake.SetBool("attackerblind",    event.GetBool("attackerblind"));
    
fake.SetBool("noscope",            event.GetBool("noscope"));

    for(
int i 1<= MaxClientsi++) if(IsClientInGame(i) && !IsFakeClient(i)) fake.FireToClient(i);
    
fake.Cancel();

    return 
Plugin_Changed;

sorry i accidentally opened the wrong file which was eventhookmodepostnocopy so it didn't work. Now this works if i type "weapon","deagle" but it doesn't work when i enter my custom file name (it shows nothing) and if player noscoped another player there is 2 killfeedback from 1 kill
__________________
My Steam
My Youtube Channel
My Github
My Discord : pr0mers#0369
-I always write unnecessary plugins-
(you can tell me better ways to do something, thank you)

Last edited by pr0mers; 08-11-2021 at 04:58.
pr0mers is offline