PDA

View Full Version : Plugin Request: Hide Killfeed


Tank_in_Pink
06-14-2016, 12:29
Hey guys, this is my first post so please tell me if I did something wrong.
I'm searching for a plugin that simply removes the killfeed or the deathnotices in CSGO. If there is already a plugin like this it would be nice if you just link it ;) If not that would be something you could think off. I'm thinking about to start creating plugins too so i might start with this if it isn't too hard... ^^
Thank you for your help already,
TΛNK

Jakeey802
06-15-2016, 02:15
https://forums.alliedmods.net/showthread.php?p=1684156

if u remove isfakeclient from that code pretty sure it will do what you want

Tank_in_Pink
06-16-2016, 09:21
https://forums.alliedmods.net/showthread.php?p=1684156

if u remove isfakeclient from that code pretty sure it will do what you want

can somebody do this for me? because i cant install the sourcemod plugin for my notepad++
it would be nice too if somebody would be explain how i do install the plugin :)

Jakeey802
06-16-2016, 12:04
Should work. Untested
addons/sourcemod/plugins/

irepz
06-17-2016, 09:57
Possible to make it display only your own killfeed ? :3

irepz
01-02-2017, 13:09
Bump, is it possible only for yourself ?
Can pay if someone can do it :3

psychonic
01-02-2017, 14:08
#include <sourcemod>

public void OnPluginStart()
{
HookEvent("player_death", OnPlayerDeath, EventHookMode_Pre);
}

public Action OnPlayerDeath(Event event, const char[] strName, bool bDontBroadcast)
{
event.BroadcastDisabled = true;

int attacker = GetClientOfUserId(event.GetInt("attacker"));
if (attacker != 0 && IsClientConnected(attacker))
{
event.FireToClient(attacker);
}

return Plugin_Continue;
}

irepz
01-03-2017, 08:56
Awesome, i guess we're close to make it works :p

L 01/03/2017 - 13:53:47: [SM] Exception reported: Game event "player_death" could not be fired because it was not created by this plugin
L 01/03/2017 - 13:53:47: [SM] Blaming: killfeed.smx
L 01/03/2017 - 13:53:47: [SM] Call stack trace:
L 01/03/2017 - 13:53:47: [SM] [0] Event.FireToClient
L 01/03/2017 - 13:53:47: [SM] [1] Line 15, killfeed.sp::OnPlayerDeath

psychonic
01-03-2017, 11:13
Whoops, sorry. Looks like the event has to be recreated from scratch and manually copied. I'll see if there's a better way.

psychonic
01-03-2017, 20:40
The example I gave above should now work on the latest dev build of SM.

irepz
01-04-2017, 05:09
Working in one way, display the killfeed when you kill someone but doesn't display who killed you.

L 01/04/2017 - 10:07:20: [SM] Exception reported: Sending events to fakeclients is not supporte
d on this game (client 2)
L 01/04/2017 - 10:07:20: [SM] Blaming: killfeed.smx
L 01/04/2017 - 10:07:20: [SM] Call stack trace:
L 01/04/2017 - 10:07:20: [SM] [0] Event.FireToClient
L 01/04/2017 - 10:07:20: [SM] [1] Line 15, killfeed.sp::OnPlayerDeath

psychonic
01-04-2017, 07:32
I misinterpreted "your own killfeed" as your own kills. Deaths will be included below, as well as a fix for that error being logged.
#include <sourcemod>

public void OnPluginStart()
{
HookEvent("player_death", OnPlayerDeath, EventHookMode_Pre);
}

public Action OnPlayerDeath(Event event, const char[] strName, bool bDontBroadcast)
{
event.BroadcastDisabled = true;

int attacker = GetClientOfUserId(event.GetInt("attacker"));
if (attacker != 0 && IsClientConnected(attacker) && !IsFakeClient(attacker))
{
event.FireToClient(attacker);
}

int victim = GetClientOfUserId(event.GetInt("userid"));
if (victim != 0 && victim != attacker && IsClientConnected(victim) && !IsFakeClient(victim))
{
event.FireToClient(victim);
}

return Plugin_Continue;
}

irepz
01-04-2017, 08:53
Compiling killfeed.sp...
SourcePawn Compiler 1.9.0.6030
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2015 AlliedModders LLC

killfeed.sp(13) : error 017: undefined symbol "client"

1 Error.

psychonic
01-04-2017, 09:28
There was a minor typo. Fixed above.

irepz
01-04-2017, 11:30
Thanks, working fine except it display your own kills 2 times

http://images.akamai.steamusercontent.com/ugc/187296715215913954/82D642A38E7111D5A2C308E575D4A1AB07EC7CC9/

Chaosxk
01-04-2017, 14:56
Change

return Plugin_Continue;

to

return Plugin_Changed;

irepz
01-04-2017, 16:33
Change

return Plugin_Continue;

to

return Plugin_Changed;

This result in displaying your own kill 3 times and your death 2 times (vs 2 and 1 before)

DarkDeviL
01-04-2017, 16:40
return Plugin_Handled; ?

irepz
01-04-2017, 16:49
return Plugin_Handled; ?

This time, it's 4x kills and 3x death :D

Mitchell
01-04-2017, 16:51
This time, it's 4x kills and 3x death :D

I have a feeling that you have uploaded and loaded 4 different plugins that does the same thing.
or FireToClient doesn't respect the HookEvent.

DarkDeviL
01-04-2017, 16:59
I have a feeling that you have uploaded and loaded 4 different plugins that does the same thing.

I was sitting with the same impression.

Look out and make sure you actually overwrote your previous plugin(s), rather than loading another one of them each time. ;)

irepz
01-04-2017, 17:06
dayum you're right, i'm using a new system and i thought it was overriding plugin but in fact not...

Btw, kills are still displayed 2 times :D

Chaosxk
01-04-2017, 17:09
Did you try any of the changes me or arne made? after overwriting your old one.

irepz
01-04-2017, 17:35
Sorry wasn't able to edit my post. Seems working, i'll do more test tomorrow and let you know thanks for all =)

fragnichtnach
02-15-2017, 05:12
I misinterpreted "your own killfeed" as your own kills. Deaths will be included below, as well as a fix for that error being logged.
#include <sourcemod>

public void OnPluginStart()
{
HookEvent("player_death", OnPlayerDeath, EventHookMode_Pre);
}

public Action OnPlayerDeath(Event event, const char[] strName, bool bDontBroadcast)
{
event.BroadcastDisabled = true;

int attacker = GetClientOfUserId(event.GetInt("attacker"));
if (attacker != 0 && IsClientConnected(attacker) && !IsFakeClient(attacker))
{
event.FireToClient(attacker);
}

int victim = GetClientOfUserId(event.GetInt("userid"));
if (victim != 0 && victim != attacker && IsClientConnected(victim) && !IsFakeClient(victim))
{
event.FireToClient(victim);
}

return Plugin_Continue;
}

Is this causing any problems, if I am hooking the "player_death"-event in another plugin?
HookEventEx("player_death", EventPlayerDeath);
public Action:EventPlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
I upgraded to sourcemod 1.9 because I want to run this! Now I get this error:
L 02/01/2017 - 17:40:50: [SM] Exception reported: Instruction contained invalid parameter
L 02/01/2017 - 17:40:50: [SM] Blaming: ranking.smx
L 02/01/2017 - 17:40:50: [SM] Call stack trace:
L 02/01/2017 - 17:40:50: [SM] [1] Line 2189, ranking.sp::EventPlayerDeath

edited: It is probably not related to this killfeed-plugin. Same errors without the killfeed-plugin. It is related to sourcemod 1.9! Is there anything to keep in mind while working and reading from events?

edited 2nd time: I think "Format()" is causing the problem with a lot of parameters. But I am not sure. I can't really figure it out. The same error is appearing at the RankMe plugin every time it wants to save a player to the database.

fragnichtnach
02-15-2017, 08:34
Is there a way to build this with 1.8? 1.9 is throwing errors that i can't get rid of...

Mitchell
02-15-2017, 10:05
Try just using this plugin: https://forums.alliedmods.net/showthread.php?p=2490626

fragnichtnach
02-15-2017, 12:46
Try just using this plugin: https://forums.alliedmods.net/showthread.php?p=2490626
Thanks, this should work.

Vit_amin
10-23-2017, 17:09
Why when we used FireToClient we don't close Handle ?

Fires a game event to only the specified client.

Unlike Fire, this function DOES NOT close the event Handle.

Mitchell
10-23-2017, 17:35
Why when we used FireToClient we don't close Handle ?

So you can send to multiple different clients. You just need to close it after sending it to all the players you want, no big deal.

Vit_amin
10-23-2017, 17:47
So you can send to multiple different clients. You just need to close it after sending it to all the players you want, no big deal.

Show pls example

P.S. Need create global variable for Event Handle ?