Raised This Month: $51 Target: $400
 12% 

Plugin Request: Hide Killfeed


Post New Thread Reply   
 
Thread Tools Display Modes
irepz
Senior Member
Join Date: Mar 2013
Location: France
Old 01-04-2017 , 05:09   Re: Plugin Request: Hide Killfeed
Reply With Quote #11

Working in one way, display the killfeed when you kill someone but doesn't display who killed you.

Quote:
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
__________________
irepz is offline
psychonic

BAFFLED
Join Date: May 2008
Old 01-04-2017 , 07:32   Re: Plugin Request: Hide Killfeed
Reply With Quote #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.
Code:
#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; }

Last edited by psychonic; 01-04-2017 at 09:27.
psychonic is offline
irepz
Senior Member
Join Date: Mar 2013
Location: France
Old 01-04-2017 , 08:53   Re: Plugin Request: Hide Killfeed
Reply With Quote #13

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.
__________________
irepz is offline
psychonic

BAFFLED
Join Date: May 2008
Old 01-04-2017 , 09:28   Re: Plugin Request: Hide Killfeed
Reply With Quote #14

There was a minor typo. Fixed above.
psychonic is offline
irepz
Senior Member
Join Date: Mar 2013
Location: France
Old 01-04-2017 , 11:30   Re: Plugin Request: Hide Killfeed
Reply With Quote #15

Thanks, working fine except it display your own kills 2 times

http://images.akamai.steamuserconten...4A1AB07EC7CC9/
__________________
irepz is offline
Chaosxk
Veteran Member
Join Date: Aug 2010
Location: Westeros
Old 01-04-2017 , 14:56   Re: Plugin Request: Hide Killfeed
Reply With Quote #16

Change

Code:
return Plugin_Continue;
to

Code:
return Plugin_Changed;
__________________
Chaosxk is offline
irepz
Senior Member
Join Date: Mar 2013
Location: France
Old 01-04-2017 , 16:33   Re: Plugin Request: Hide Killfeed
Reply With Quote #17

Quote:
Originally Posted by Chaosxk View Post
Change

Code:
return Plugin_Continue;
to

Code:
return Plugin_Changed;
This result in displaying your own kill 3 times and your death 2 times (vs 2 and 1 before)
__________________
irepz is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 01-04-2017 , 16:40   Re: Plugin Request: Hide Killfeed
Reply With Quote #18

Code:
return Plugin_Handled;
?
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
irepz
Senior Member
Join Date: Mar 2013
Location: France
Old 01-04-2017 , 16:49   Re: Plugin Request: Hide Killfeed
Reply With Quote #19

Quote:
Originally Posted by arne1288 View Post
Code:
return Plugin_Handled;
?
This time, it's 4x kills and 3x death
__________________
irepz is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 01-04-2017 , 16:51   Re: Plugin Request: Hide Killfeed
Reply With Quote #20

Quote:
Originally Posted by irepz View Post
This time, it's 4x kills and 3x death
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.

Last edited by Mitchell; 01-04-2017 at 16:53.
Mitchell is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode