![](images/misc/post_spacer.gif) |
Junior Member
|
![Old](images/statusicon/post_old.svg)
08-11-2021
, 04:56
Re: [HELP]Trying to do custom kill feed icons
|
#4
|
Quote:
Originally Posted by kratoss1812
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[] name, bool 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; i <= MaxClients; i++) 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
__________________
Last edited by pr0mers; 08-11-2021 at 04:58.
|
|
|
|