Raised This Month: $32 Target: $400
 8% 

blocking death messages


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kossolax
AlliedModders Donor
Join Date: Jan 2008
Location: Belgium
Old 03-14-2010 , 11:56   blocking death messages
Reply With Quote #1

Hello,
I'm trying to blocking the hud top-right death messages

like this one:
[IMG]http://img26.**************/img26/7519/deathmsg.jpg[/IMG]


I have tried this:
PHP Code:
public OnPluginStart() {
    
HookEvent("player_death"EventPlayerDeathEventHookMode_Pre);
}

public 
Action:EventPlayerDeath(Handle:event,const String:name[],bool:dontBroadcast) {
    
    return 
Plugin_Handled;

and this:
PHP Code:
public Action:EventPlayerDeath(Handle:event,const String:name[],bool:dontBroadcast) {
    
    
dontBroadcast false;
    
    return 
Plugin_Changed;

as found in this thread http://forums.alliedmods.net/showthread.php?t=110805 and some others...

but both are crashing my server ... why?

Anyone could help me please?
Thank's in advance
kossolax is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 03-14-2010 , 12:06   Re: blocking death messages
Reply With Quote #2

Try this:
PHP Code:
public Action:EventPlayerDeath(Handle:event, const String:name[], bool:dontBroadcast
{
    
SetEventBroadcast(eventtrue);

__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
kossolax
AlliedModders Donor
Join Date: Jan 2008
Location: Belgium
Old 03-14-2010 , 12:13   Re: blocking death messages
Reply With Quote #3

ahhh perfect, thank you
kossolax is offline
Dim_oK
AlliedModders Donor
Join Date: Feb 2011
Location: Mother Russia
Old 12-08-2012 , 05:17   Re: blocking death messages
Reply With Quote #4

I need to remove only the Terrorist
How to do it?
__________________
Sorry for my bad english

Last edited by Dim_oK; 12-08-2012 at 05:18.
Dim_oK is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 12-08-2012 , 16:26   Re: blocking death messages
Reply With Quote #5

Quote:
Originally Posted by Dim_oK View Post
I need to remove only the Terrorist
How to do it?
If a terrorist kills someone or dies?
PHP Code:
public Action:EventPlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)  

    if (
GetClientTeam(GetClientOfUserId(GetEventInt(event"userid"))) == 2)
        
SetEventBroadcast(eventtrue); 

The above is if a terrorist dies, then it doesn't show the message.
If you want to make it the other way, change "userid" to "attacker".
__________________
Need help? PM me or add me on Steam.
My Steam




Quote:
Originally Posted by Rp.KryptoNite View Post
For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING
minimoney1 is offline
Dim_oK
AlliedModders Donor
Join Date: Feb 2011
Location: Mother Russia
Old 12-09-2012 , 03:38   Re: blocking death messages
Reply With Quote #6

minimoney1, Thanks
__________________
Sorry for my bad english
Dim_oK is offline
Dim_oK
AlliedModders Donor
Join Date: Feb 2011
Location: Mother Russia
Old 12-10-2012 , 15:07   Re: blocking death messages
Reply With Quote #7

The plugin generates an error that is not so?

[SM] [0] Line 17, /home/groups/sourcemod/upload_tmp/phpQ8q9jn.sp::EventPlayerDeath()
__________________
Sorry for my bad english
Dim_oK is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 12-10-2012 , 20:46   Re: blocking death messages
Reply With Quote #8

You only posted a partial error. Also, we can't help you if you don't provide us with the source of the plugin.
bl4nk is offline
Dim_oK
AlliedModders Donor
Join Date: Feb 2011
Location: Mother Russia
Old 12-10-2012 , 23:26   Re: blocking death messages
Reply With Quote #9

bl4nk, Sorry, I forgot.

#include <sourcemod>

public Plugin:myinfo =
{
name = "",
author = "",
description = "",
version = "",
url = ""
};

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

public Action:EventPlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
if (GetClientTeam(GetClientOfUserId(GetEventInt( event, "attacker"))) == 2)
SetEventBroadcast(event, true);
}
__________________
Sorry for my bad english

Last edited by Dim_oK; 12-10-2012 at 23:40.
Dim_oK is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 12-11-2012 , 09:35   Re: blocking death messages
Reply With Quote #10

Quote:
Originally Posted by Dim_oK View Post
bl4nk, Sorry, I forgot.

#include <sourcemod>

public Plugin:myinfo =
{
name = "",
author = "",
description = "",
version = "",
url = ""
};

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

public Action:EventPlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
if (GetClientTeam(GetClientOfUserId(GetEventInt( event, "attacker"))) == 2)
SetEventBroadcast(event, true);
}
Code:
#include <sourcemod>

public Plugin:myinfo = 
{
	name = "",
	author = "",
	description = "",
	version = "",
	url = ""
};

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

public Action:EventPlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)   
{  
    if (GetClientTeam(GetClientOfUserId(GetEventInt(event, "attacker"))) == 2) 
        SetEventBroadcast(event, true);  
}
not sure what the error message actualy stated, but maybe the client wasnt valid?
Or the evnet didnt return plugin_contrinue, or something, not sure.

Last edited by Mitchell; 12-11-2012 at 09:35.
Mitchell is offline
Reply


Thread Tools
Display Modes

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 06:39.


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