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

CS:GO Connect/disconnect/joining team messages remover


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nexd
BANNED
Join Date: Dec 2013
Location: Hungary
Old 04-22-2018 , 07:03   CS:GO Connect/disconnect/joining team messages remover
Reply With Quote #1

Hello guys!
I want a plugin what remove these messages:
xyz is joining the Terrorist force
(same with ct,spectator)
Player xyz left the game (Disconnect)
(same with joining)

Can someone make it for me? i already tried this: https://forums.alliedmods.net/showthread.php?t=265113

Last edited by Nexd; 04-22-2018 at 07:04.
Nexd is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 04-22-2018 , 07:52   Re: CS:GO Connect/disconnect/joining team messages remover
Reply With Quote #2

Tidy chat with fix (read last page)
Indarello is offline
Zyten
Senior Member
Join Date: Jan 2018
Old 04-22-2018 , 16:46   Re: CS:GO Connect/disconnect/joining team messages remover
Reply With Quote #3

is that puzzle can u indarello give more simple answer please. if u could send the code would be kind from u

Last edited by Zyten; 04-22-2018 at 17:10.
Zyten is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 04-23-2018 , 08:04   Re: CS:GO Connect/disconnect/joining team messages remover
Reply With Quote #4

https://forums.alliedmods.net/showthread.php?t=101340
+ fix
https://forums.alliedmods.net/showpo...84&postcount=9
Indarello is offline
Zyten
Senior Member
Join Date: Jan 2018
Old 04-23-2018 , 16:56   Re: CS:GO Connect/disconnect/joining team messages remover
Reply With Quote #5

:S can u send one ready fixed .sp ?
Zyten is offline
Zyten
Senior Member
Join Date: Jan 2018
Old 04-23-2018 , 17:55   Re: CS:GO Connect/disconnect/joining team messages remover
Reply With Quote #6

#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>

ConVar g_cvarEnabled;
ConVar g_cvarVoice;
ConVar g_cvarConnect;
ConVar g_cvarDisconnect;
ConVar g_cvarChangeClass;
ConVar g_cvarTeam;
ConVar g_cvarArenaResize;
ConVar g_cvarArenaMaxStreak;
ConVar g_cvarCvar;
ConVar g_cvarAllText;

EngineVersion g_engine = Engine_Unknown;

#define PLUGIN_VERSION "0.5"
public Plugin myinfo =
{
name = "Tidy Chat",
author = "linux_lover",
description = "Cleans up the chat area.",
version = PLUGIN_VERSION,
url = "https://forums.alliedmods.net/showthread.php?t=101340",
};

public void OnPluginStart()
{
CreateConVar("sm_tidychat_version", PLUGIN_VERSION, "Tidy Chat Version", FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);

g_cvarEnabled = CreateConVar("sm_tidychat_on", "1", "0/1 On/off");
g_cvarVoice = CreateConVar("sm_tidychat_voice", "1", "0/1 Tidy (Voice) messages");
g_cvarConnect = CreateConVar("sm_tidychat_connect", "0", "0/1 Tidy connect messages");
g_cvarDisconnect = CreateConVar("sm_tidychat_disconnect", "0", "0/1 Tidy disconnect messsages");
g_cvarChangeClass = CreateConVar("sm_tidychat_class", "1", "0/1 Tidy class change messages");
g_cvarTeam = CreateConVar("sm_tidychat_team", "1", "0/1 Tidy team join messages");
g_cvarArenaResize = CreateConVar("sm_tidychat_arena_resize", "1", "0/1 Tidy arena team resize messages");
g_cvarArenaMaxStreak = CreateConVar("sm_tidychat_arena_maxstreak", "1", "0/1 Tidy (arena) team scramble messages");
g_cvarCvar = CreateConVar("sm_tidychat_cvar", "1", "0/1 Tidy cvar messages");
g_cvarAllText = CreateConVar("sm_tidychat_alltext", "0", "0/1 Tidy all chat messages from plugins");

// Mod independant hooks
HookEvent("player_connect_client", Event_PlayerConnect, EventHookMode_Pre);
HookEvent("player_disconnect", Event_PlayerDisconnect, EventHookMode_Pre);
HookEvent("player_team", Event_PlayerTeam, EventHookMode_Pre);
HookEvent("server_cvar", Event_Cvar, EventHookMode_Pre);
HookUserMessage(GetUserMessageId("TextMsg"), UserMsg_TextMsg, true);

g_engine = GetEngineVersion();

// TF2 dependant hooks
if(g_engine == Engine_TF2)
{
HookUserMessage(GetUserMessageId("VoiceSubtit le"), UserMsg_VoiceSubtitle, true);
HookEvent("arena_match_maxstreak", Event_MaxStreak, EventHookMode_Pre);
}
}

public Action Event_PlayerConnect(Event eEvent, const char[] name, bool bDontBroadcast)
{
if(g_cvarEnabled.BoolValue && g_cvarConnect.BoolValue)
{
bDontBroadcast = true;
eEvent.BroadcastDisabled = true;
}

return Plugin_Continue;
}

public Action Event_PlayerDisconnect(Event eEvent, const char[] name, bool bDontBroadcast)
{
if(g_cvarEnabled.BoolValue && g_cvarDisconnect.BoolValue)
{
bDontBroadcast = true;
eEvent.BroadcastDisabled = true;
}

return Plugin_Continue;
}

public Action Event_PlayerTeam(Event eEvent, const char[] name, bool bDontBroadcast)
{
if(g_cvarEnabled.BoolValue && g_cvarTeam.BoolValue)
{
if(!eEvent.GetBool("silent"))
{
bDontBroadcast = true;
eEvent.BroadcastDisabled = true;
}
}

return Plugin_Continue;
}

public Action Event_MaxStreak(Event eEvent, const char[] name, bool bDontBroadcast)
{
if(g_cvarEnabled.BoolValue && g_cvarArenaMaxStreak.BoolValue)
{
bDontBroadcast = true;
eEvent.BroadcastDisabled = true;
}

return Plugin_Continue;
}

public Action Event_Cvar(Event eEvent, const char[] name, bool bDontBroadcast)
{
if(g_cvarEnabled.BoolValue && g_cvarCvar.BoolValue)
{
bDontBroadcast = true;
eEvent.BroadcastDisabled = true;
}

return Plugin_Continue;
}

public Action UserMsg_VoiceSubtitle(UserMsg msg_id, BfRead msg, const int[] players, int playersNum, bool reliable, bool init)
{
if(g_cvarEnabled.BoolValue && g_cvarVoice.BoolValue)
{
return Plugin_Handled;
}

return Plugin_Continue;
}

public Action UserMsg_TextMsg(UserMsg msg_id, BfRead msg, const int[] players, int playersNum, bool reliable, bool init)
{
if(g_cvarEnabled.BoolValue)
{
if(g_cvarAllText.BoolValue) return Plugin_Handled;

if(g_engine == Engine_TF2)
{
char message[32];
msg.ReadByte();
msg.ReadString(message, sizeof(message));

//PrintToServer("message = \"%s\"", message);

if(g_cvarChangeClass.BoolValue && (strcmp(message, "#game_respawn_as") == 0 || strcmp(message, "#game_spawn_as") == 0))
{
return Plugin_Handled;
}

if(g_cvarArenaResize.BoolValue && strncmp(message, "#TF_Arena_TeamSize", 1 == 0) // #TF_Arena_TeamSizeIncreased/Decreased
{
return Plugin_Handled;
}
}
}

return Plugin_Continue;
}


is that plugin for tf only? i tried that with csgo dosent work

Last edited by Zyten; 04-24-2018 at 18:19.
Zyten is offline
Nexd
BANNED
Join Date: Dec 2013
Location: Hungary
Old 04-27-2018 , 18:37   Re: CS:GO Connect/disconnect/joining team messages remover
Reply With Quote #7

Its worked for me, just restart the server
Attached Files
File Type: sp Get Plugin or Get Source (scs_tisztitas.sp - 1076 views - 4.3 KB)
Nexd is offline
Zyten
Senior Member
Join Date: Jan 2018
Old 04-27-2018 , 19:39   Re: CS:GO Connect/disconnect/joining team messages remover
Reply With Quote #8

Quote:
Originally Posted by Nexd View Post
Its worked for me, just restart the server
seems like joined team working but if someone connect to server dosent work to me

Last edited by Zyten; 04-27-2018 at 19:55.
Zyten is offline
Nexd
BANNED
Join Date: Dec 2013
Location: Hungary
Old 04-27-2018 , 20:59   Re: CS:GO Connect/disconnect/joining team messages remover
Reply With Quote #9

edit the sm_tidychat_connect
sm_tidychat_disconnect
etc.. convars
Nexd 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 02:14.


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