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

Showing deathnotices in CS:GO only to players involved


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
carlS
AlliedModders Donor
Join Date: Dec 2015
Location: Germany
Old 08-22-2017 , 19:25   Showing deathnotices in CS:GO only to players involved
Reply With Quote #1

Hey guys,

I'm trying to write little plugin which only shows the deathnotices in CS:GO to the players involved (killer, victim, assister).

I know how to block that event in general:
Code:
public void OnPluginStart()
{
	HookEvent("player_death", Event_PlayerDeath, EventHookMode_Pre);
}
 
public Action Event_PlayerDeath(Event event, const char[] name, bool dontBroadcast)
{
	SetEventBroadcast(event, true);
	return Plugin_Continue;
}
But it would be great if somebody knows how to block the event only for certain players (the ones not involved).
__________________
Respawn-Gaming: respawn-gaming.com

"Only the unknown frightens men. But once a man has faced the unknown, that terror becomes the known."
- Antoine de Saint-Exupery
carlS is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 08-22-2017 , 20:16   Re: Showing deathnotices in CS:GO only to players involved
Reply With Quote #2

The event methodmap has FireToClient. I don't think SM can selectively filter/block by client in a hook, but you can selectively send.
Fyren is offline
carlS
AlliedModders Donor
Join Date: Dec 2015
Location: Germany
Old 08-22-2017 , 20:25   Re: Showing deathnotices in CS:GO only to players involved
Reply With Quote #3

Quote:
Originally Posted by Fyren View Post
but you can selectively send.
So it would be possible to block all deathnotice events and then recreate them and send them to the specific players?
Can you explain how I would send the event only to a specific player?
__________________
Respawn-Gaming: respawn-gaming.com

"Only the unknown frightens men. But once a man has faced the unknown, that terror becomes the known."
- Antoine de Saint-Exupery
carlS is offline
lay295
Senior Member
Join Date: Sep 2013
Old 08-22-2017 , 20:30   Re: Showing deathnotices in CS:GO only to players involved
Reply With Quote #4

https://forums.alliedmods.net/showpo...4&postcount=12

https://forums.alliedmods.net/showthread.php?t=293304
__________________

lay295 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 17:02.


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