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

Disabling player has joined team messages [HELP]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
'-_-'<3zok<3'-_-'
Senior Member
Join Date: Feb 2010
Location: Norway
Old 11-09-2015 , 16:50   Disabling player has joined team messages [HELP]
Reply With Quote #1

Is there any buildt in function in sm to disable the message when a player joins and changes teams? my server quickly switches the teams and its spamming the chat, and getting on my nerves.
'-_-'<3zok<3'-_-' is offline
Send a message via Skype™ to '-_-'<3zok<3'-_-'
hamilton5
Veteran Member
Join Date: Oct 2012
Location: USA
Old 11-09-2015 , 20:34   Re: Disabling player has joined team messages [HELP]
Reply With Quote #2

If built in just means some cvar for you to switch then no.. but if you mean its script-ability - well then yes of course.
hamilton5 is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 11-09-2015 , 22:40   Re: Disabling player has joined team messages [HELP]
Reply With Quote #3

PHP Code:
#include <sourcemod>

public OnPluginStart() 
{
    
HookEvent("player_team"Event_PlayerTeamEventHookMode_Pre);
}

public 
Action:Event_PlayerTeam(Handle:hEvent, const String:strName[], bool:bDontBroadcast)
{
    
SetEventBroadcast(hEventtrue);
    return 
Plugin_Continue;

Simple.

And yes. SetEventBroadcast is supposed to be set to "true". It's a bit backwards:

true = disable showing of the text
false = enable showing of the text

Last edited by 404UserNotFound; 11-09-2015 at 22:40.
404UserNotFound 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 22:27.


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