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

Solved [CS:GO] Remove x join team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 08-17-2017 , 11:19   [CS:GO] Remove x join team
Reply With Quote #1

Code:
public Action:Event_PlayerTeam(Handle:event, const String:name[], bool:dontBroadcast)
{
	if(!GetEventBool(event, "silent"))
	{
		SetEventBroadcast(event, true);
	}
	
	return Plugin_Continue;
}
this code from tidy chat lead to bug where we cant buy defuse kit
need another way of remove "x join team"
https://forums.alliedmods.net/showthread.php?t=261010

Last edited by Indarello; 08-19-2017 at 14:00.
Indarello is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 08-17-2017 , 11:43   Re: [CS:GO] Remove x join team
Reply With Quote #2

You could try hooking the TextMsg instead.
Mitchell is offline
OSWO
Senior Member
Join Date: Jul 2015
Location: United Kingdom, London
Old 08-17-2017 , 12:24   Re: [CS:GO] Remove x join team
Reply With Quote #3

Feel free to pick and choose which game messages you want to silence.

EDIT: Use EventHookMode_Pre then use event.BroadcastDisabled = true

PHP Code:
HookUserMessage(GetUserMessageId("TextMsg"), UserMsg_TextMsgtrue);

public 
Action UserMsg_TextMsg(UserMsg msg_idBfRead msg, const int[] playersint playersNumbool reliablebool init) {
    
char C_buffer[512];
    
PbReadString(msg"params"C_buffersizeof(C_buffer), 0);

    if (
StrEqual(C_buffer"#Player_Cash_Award_ExplainSuicide_YouGotCash")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_ExplainSuicide_Spectators")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_ExplainSuicide_EnemyGotCash")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_ExplainSuicide_TeammateGotCash")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#game_respawn_as")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#game_spawn_as")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_Killed_Enemy")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Team_Cash_Award_Win_Time")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Point_Award_Assist_Enemy_Plural")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Point_Award_Assist_Enemy")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Point_Award_Killed_Enemy_Plural")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Point_Award_Killed_Enemy")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_Respawn")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_Get_Killed")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_Killed_Enemy")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_Killed_Enemy_Generic")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_Kill_Teammate")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Team_Cash_Award_Loser_Bonus")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Team_Cash_Award_Loser_Zero")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Team_Cash_Award_no_income")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Team_Cash_Award_Generic")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Team_Cash_Award_Custom")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_ExplainSuicide_YouGotCash")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_ExplainSuicide_TeammateGotCash")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_ExplainSuicide_EnemyGotCash")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_ExplainSuicide_Spectators")) {
        return 
Plugin_Handled;
    }

    return 
Plugin_Continue;

__________________
SourceTimer | WeaponSkins++ | BasePlugins++ https://github.com/OSCAR-WOS

Last edited by OSWO; 08-17-2017 at 12:29.
OSWO is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 08-17-2017 , 13:13   Re: [CS:GO] Remove x join team
Reply With Quote #4

Quote:
Originally Posted by OSWO View Post
Feel free to pick and choose which game messages you want to silence.

EDIT: Use EventHookMode_Pre then use event.BroadcastDisabled = true

PHP Code:
HookUserMessage(GetUserMessageId("TextMsg"), UserMsg_TextMsgtrue);

public 
Action UserMsg_TextMsg(UserMsg msg_idBfRead msg, const int[] playersint playersNumbool reliablebool init) {
    
char C_buffer[512];
    
PbReadString(msg"params"C_buffersizeof(C_buffer), 0);

    if (
StrEqual(C_buffer"#Player_Cash_Award_ExplainSuicide_YouGotCash")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_ExplainSuicide_Spectators")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_ExplainSuicide_EnemyGotCash")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_ExplainSuicide_TeammateGotCash")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#game_respawn_as")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#game_spawn_as")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_Killed_Enemy")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Team_Cash_Award_Win_Time")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Point_Award_Assist_Enemy_Plural")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Point_Award_Assist_Enemy")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Point_Award_Killed_Enemy_Plural")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Point_Award_Killed_Enemy")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_Respawn")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_Get_Killed")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_Killed_Enemy")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_Killed_Enemy_Generic")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_Kill_Teammate")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Team_Cash_Award_Loser_Bonus")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Team_Cash_Award_Loser_Zero")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Team_Cash_Award_no_income")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Team_Cash_Award_Generic")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Team_Cash_Award_Custom")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_ExplainSuicide_YouGotCash")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_ExplainSuicide_TeammateGotCash")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_ExplainSuicide_EnemyGotCash")) {
        return 
Plugin_Handled;
    } else if (
StrEqual(C_buffer"#Player_Cash_Award_ExplainSuicide_Spectators")) {
        return 
Plugin_Handled;
    }

    return 
Plugin_Continue;

you tried to block this way? TextMsg dont hook this event
Indarello is offline
OSWO
Senior Member
Join Date: Jul 2015
Location: United Kingdom, London
Old 08-18-2017 , 02:17   Re: [CS:GO] Remove x join team
Reply With Quote #5

I told you in that post.

Use EventHookMode_Pre then use event.BroadcastDisabled = true
__________________
SourceTimer | WeaponSkins++ | BasePlugins++ https://github.com/OSCAR-WOS
OSWO is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 08-18-2017 , 02:28   Re: [CS:GO] Remove x join team
Reply With Quote #6

Quote:
Originally Posted by OSWO View Post
I told you in that post.
Use EventHookMode_Pre then use event.BroadcastDisabled = true
I need whole code
because now i dont see difference between code from main post

Last edited by Indarello; 08-18-2017 at 02:32.
Indarello is offline
OSWO
Senior Member
Join Date: Jul 2015
Location: United Kingdom, London
Old 08-18-2017 , 07:51   Re: [CS:GO] Remove x join team
Reply With Quote #7

PHP Code:
public void OnPluginStart() {
    
HookEvent("player_team"Event_PlayerTeamEventHookMode_Pre);
}

public 
Action Event_PlayerTeam(Event eEvent, const char[] cNamebool bDontBroadcast) {
    
eEvent.BroadcastDisabled true;

    return 
Plugin_Changed;

__________________
SourceTimer | WeaponSkins++ | BasePlugins++ https://github.com/OSCAR-WOS
OSWO is offline
_GamerX
AlliedModders Donor
Join Date: Jun 2011
Location: Fun Server
Old 08-18-2017 , 09:26   Re: [CS:GO] Remove x join team
Reply With Quote #8

Quote:
Originally Posted by OSWO View Post
PHP Code:
public void OnPluginStart() {
    
HookEvent("player_team"Event_PlayerTeamEventHookMode_Pre);
}

public 
Action Event_PlayerTeam(Event eEvent, const char[] cNamebool bDontBroadcast) {
    
eEvent.BroadcastDisabled true;

    return 
Plugin_Changed;

Not work...
__________________
_GamerX is offline
Send a message via ICQ to _GamerX Send a message via Skype™ to _GamerX
OSWO
Senior Member
Join Date: Jul 2015
Location: United Kingdom, London
Old 08-18-2017 , 09:56   Re: [CS:GO] Remove x join team
Reply With Quote #9

Really? Well I didn't test it but back in the day when I was working on my Timer it worked.

https://gitlab.com/theoswo/PublicTim...oTimer.sp#L170
https://gitlab.com/theoswo/PublicTim.../Hooks.sp#L145

Try

PHP Code:
bDontBroadcast true;
eEvent.BroadcastDisabled true
__________________
SourceTimer | WeaponSkins++ | BasePlugins++ https://github.com/OSCAR-WOS

Last edited by OSWO; 08-18-2017 at 09:58.
OSWO is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 08-19-2017 , 02:10   Re: [CS:GO] Remove x join team
Reply With Quote #10

Quote:
Originally Posted by OSWO View Post
Really? Well I didn't test it but back in the day when I was working on my Timer it worked.

https://gitlab.com/theoswo/PublicTim...oTimer.sp#L170
https://gitlab.com/theoswo/PublicTim.../Hooks.sp#L145

Try

PHP Code:
bDontBroadcast true;
eEvent.BroadcastDisabled true
I will test it for defuse buy

Last edited by Indarello; 08-19-2017 at 02:21.
Indarello 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 16:10.


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