Since Simple Message Suppression is having issues spewing out errors and issues, i decided to make my own version from scratch.
[ANY] Suppress Manager
Description
Suppress messages & outputs from showin'.
ConVars 1. sm_suppress_version - Suppress Manager Version 2. sm_suppress_teams - Allow/Block Player Joined Team Message. Default: 0 (Allow) 3. sm_suppress_connect - Allow/Block Player Connected Message. Default: 0 (Allow) 4. sm_suppress_disconnect - Allow/Block Player Disconnected Message. Default: 0 (Allow) 5. sm_suppress_killfeed - Allow/Block Player Killfeed. Default: 0 (Allow) 6. sm_suppress_namechange - Allow/Block Player Name Change Message. Default: 0 (Allow) 7. sm_suppress_achievement - Allow/Block Player Achievement Get Message [TF2]. Default: 0 (Allow) 8. sm_suppress_winpanel - Allow/Block Winpanel From Showing On Win [TF2]. Default: 0 (Allow) 9. sm_suppress_annotation - Allow/Block Annotation From Showing [TF2]. Default: 0 (Allow) 10. sm_suppress_voicesubtitles - Allow/Block Player Voice Subtitles [TF2]. Default: 0 (Allow) 11. sm_suppress_cvar - Allow/Block Cvar value has changed to Message. Default: 0 (Allow) 12. sm_suppress_chat - Allow/Block chat messages. Default: 0 (Allow)
Plans 1. Add global native support for plugins can rely on. Done. 2. Replace the current connect, disconnect & team change events to rely on SayText2 usermessage function for a better way to block the messages.
Dependencies 1. Suppress Manager Include to compile, comes with the zip file you download together with the plugin.
/**
* Returns in SuppressType if the 'player x joined team y' or 'player x has been auto-assigned to team y' are blocked.
*
* @return Suppress_Disabled Disabled.
* @return Suppress_Enabled Enabled.
* @return Suppress_BlockOnlyBots Block only bots team join messages. (Unused atm)
* @return Suppress_BlockOnlyPlayers Block only players team join messages. (Unused atm)
*/
native SuppressType SuppressManager_IsTeamJoinMsgBlocked();
/**
* Returns in SuppressType if the connect messsages are blocked.
*
* @return Suppress_Disabled Disabled.
* @return Suppress_Enabled Enabled.
* @return Suppress_BlockOnlyBots Block only bots connect messages.
* @return Suppress_BlockOnlyPlayers Block only players connect messsages.
*/
native SuppressType SuppressManager_IsConnectMsgBlocked();
/**
* Returns in SuppressType if the disconnect messages are blocked.
*
* @return Suppress_Disabled Disabled.
* @return Suppress_Enabled Enabled
* @return Suppress_BlockOnlyBots Block only bots disconnect messages.
* @return Suppress_BlockOnlyPlayers Block only players disconnect messages.
*/
native SuppressType SuppressManager_IsDisconnectMsgBlocked();
/**
* Returns if the killfeed is blocked.
*/
native bool SuppressManager_IsKillfeedBlocked();
/**
* Returns if the tf2 winpanel is blocked.
*/
native bool SuppressManager_TF2_IsWinpanelBlocked();
/**
* Returns if the 'player x earned achievement y' is blocked.
*/
native bool SuppressManager_IsAchievementsBlocked();
/**
* Returns if the tf2 annotations is blocked.
*/
native bool SuppressManager_TF2_IsAnnotationsBlocked();
/**
* Returns if the Name changes is blocked.
*/
native bool SuppressManager_IsNameChangeBlocked();
/**
* Returns if the TF2 voice chat subtitles is blocked.
*/
native bool SuppressManager_TF2_IsVoiceSubTitlesBlocked();
/**
* Returns if the 'server cvar x has been changed' is blocked.
*/
native bool SuppressManager_IsServerCvarChangesBlocked();
/**
* Returns in SuppressChatType if the chat messages has been blocked.
*
* @return Suppress_Chat_Disabled = Disabled.
* @return Suppress_Chat_Enabled = Enabled.
* @return Suppress_Chat_DisablePublicChat = Blocks public chat.
* @return Suppress_Chat_DisableTeamChat = Blocks team chat.
*/
native Suppress_ChatType SuppressManager_IsChatMessagesBlocked();
Changelog
Quote:
Version 0.7.1 - Tuesday 4th January 2022 + Added Updater support. + Cleaned up code.
Version 0.7.0 - March 2nd, 2021 + Added global native support for your plugins to be able to use.
Version 0.6.1 - February 21st, 2021 + Updated some codelines to newer syntax. + Fixed invalid event error on TF2 Classic upon loading plugin.
Version 0.6.0 - January 22nd, 2021 + Added sm_suppress_chat convar to block out chat messages.
Version 0.5.0 - December 22nd, 2020 + Updated code slightly. + Updated killfeed to include the slap notices. + Fixed errors related to invalid clients, will now be properly checked if it's a valid client or not. ~ I'm back from a while break.
Version 0.4.2 - August 21st, 2020 + Updated to new syntax and declarations. + Updated game detection + Cleaned up the code.
Version 0.4.1 - July 10th, 2020 + Fixed ConVar sm_suppress_winpanel not working. + Fixed ConVar sm_suppress_annotation not working. + Fixed ConVar sm_suppress_voicesubtitles not working.
Version 0.4 - July 10th, 2020 + Added sm_suppress_cvar - Allow/Block Server Cvar value has changed to Message. + Updated sm_suppress_connect - Added value 2 and 3 to specify to block bot or player connect message. + Updated sm_suppress_disconnect - Added value 2 and 3 to specify to block bot or player disconnect showing with the reason why they left.
Version 0.3.1 - July 8th, 2020 - Removed achievement_earned_local as a hook to prevent Game event does not exist. error
Version 0.3 - July 7th, 2020 + Added sm_suppress_namechange - Allow/Block Player Name Change Message (Credits: Bacardi). + Added sm_suppress_achievement - Allow/Block Player Achievement Get Message. + Added sm_suppress_winpanel - Allow/Block Winpanel From Showing On Win [TF2]. + Added sm_suppress_annotation - Allow/Block Annotation From Showing [TF2]. + Added sm_suppress_voicesubtitles - Allow/Block Player Voice Subtitles [TF2] (Credits: GORRageBoy).
Version 0.2 - July 6th, 2020 + Added sm_suppress_killfeed - Block player killfeed.
i don't know exactly why it is spewing out warnings for hooking SayText2. i tested compiling without it and the plugin compiles with 0 errors or warnings