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

[CS:GO] Block "Saved Player" Text


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mitchell
~lick~
Join Date: Mar 2010
Plugin ID:
4293
Plugin Version:
1.0.0
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    one of the recent updates to cs:go added in this feature, with no way of blocking it, until now.
    Old 07-29-2014 , 23:52   [CS:GO] Block "Saved Player" Text
    Reply With Quote #1

    What: blocks the "Player 1 saved player 2" text from chat.
    Why: because the text was pretty distracting, especially for servers that actually want players to communicate through chat...
    How: hooks the TextMsg and checks if it contains "SavedPlayer" if so then return it.

    [IMG]http://s17.************/mw8ppzedb/2014_07_29_00001.jpg[/IMG]
    Attached Files
    File Type: sp Get Plugin or Get Source (savedplayer.sp - 2458 views - 906 Bytes)

    Last edited by Mitchell; 07-29-2014 at 23:55.
    Mitchell is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 07-30-2014 , 00:02   Re: [CS:GO] Block "Saved Player" Text
    Reply With Quote #2

    Hmph! Bad Mitchell! I was a few hours away from releasing a portion of my CS:GO Idle plugin that does the same thing, but with a simple KV configuration that let users pick input which TextMsgs they wanted to block vs hardcoding one. You should totally save me the hassle of supporting such a plugin by tweaking yours a little *nudge nudge*. Also, Hi!

    *Edit*

    PHP Code:
    public Action:UserMessageHook_Text(UserMsg:msg_idHandle:msg, const players[], playersNumbool:reliablebool:init)
    {
        if(!
    g_iEnabled)
            return 
    Plugin_Continue;

        
    decl String:sBuffer[64], String:sResult[64];
        new 
    iRepeat PbGetRepeatedFieldCount(msg"params");
        for(new 
    0iRepeati++)
        {
            
    PbReadString(msg"params"sBuffersizeof(sBuffer), i);
            if(
    StrEqual(sBuffer""))
                continue;

            if(
    g_iMethodNotifications cEventPhrase)
            {
                for(new 
    0g_iTotalHiddenPhrasesj++)
                {
                    
    GetArrayString(g_hArray_HiddenPhrasejsResultsizeof(sResult));
                    if(
    StrContains(sBuffersResult) != -1)
                        return 
    Plugin_Handled;
                }
            }
        }

        return 
    Plugin_Continue;
    }

    Define_Phrases()
    {
        if(
    g_hArray_HiddenPhrase == INVALID_HANDLE)
            
    g_hArray_HiddenPhrase CreateArray(16);
        else
            
    ClearArray(g_hArray_HiddenPhrase);

        
    decl String:sPath[PLATFORM_MAX_PATH];
        
    BuildPath(Path_SMsPathsizeof(sPath), g_sPathPhrases);

        if(!
    FileExists(sPath))
        {
            if(
    g_iEnabled == 2)
                
    LogToFile(g_sPluginLog"[CONFIG.ERROR] Hidden Phrases System - %s - File Not Found"sPath);

            
    LogError("[Idle Manager][CONFIG.ERROR] Hidden Phrases System - %s - File Not Found"sPath);
            return 
    false;
        }

        new 
    Handle:hKeyValues CreateKeyValues("Idle.Configs");
        
    KvSetEscapeSequences(hKeyValuestrue);
        if(
    FileToKeyValues(hKeyValuessPath) && KvGotoFirstSubKey(hKeyValues))
        {
            
    decl String:sResult[64];
            
    g_iTotalHiddenPhrases 0;
            
    KvGotoFirstSubKey(hKeyValuesfalse);
            do
            {
                
    KvGetSectionName(hKeyValuessResultsizeof(sResult));
                
    PushArrayString(g_hArray_HiddenPhrasesResult);

                
    g_iTotalHiddenPhrases++;
            }
            while(
    KvGotoNextKey(hKeyValuesfalse));

            return 
    true;
        }

        return 
    false;

    PHP Code:
    "Idle.Phrases"
    {
        
    //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
        //TextMsg Phrases defined below will not appear for any client if it is detected.
        //- This is not for messages sent by players, but rather internal game communication that players receive.
        //- You can find these strings within /csgo/resource/csgo_english.txt
        //
        //- Hidden Phrases preforms a StrContains check, in other words, it checks the header of the phrase
        //-- for any of the below messages. If the header contains any of the character combinations below,
        //-- the message will be blocked from clients.
        //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

        
    "Phrases"
        
    {
            
    //Remove any reward spam players receive for killing a player.
            
    "Player_Cash_Award"                            ""
            "Team_Cash_Award"                            ""
            "Player_Point_Award"                        ""

            
    //Player attacked a teammate messages.
            
    "Cstrike_TitlesTXT_Game_teammate_attack"    ""

            
    //Player has been saved by another player.
            
    "Chat_SavePlayer_"                            ""

            
    //Player has joined a team messages.
            
    "Cstrike_game_join_"                        ""

            
    //If you're running DeathMatch, remove some spam about weapons / domination.
            //"SFUI_Notice_DM_BonusRespawn"                ""
            //"SFUI_Notice_DM_BonusSwitchTo"            ""
            //"SFUI_Notice_DM_BonusWeaponText"            ""
            //"Player_You_Are_"                            ""

            //Warmup currently in progress messages.
            
    "SFUI_Notice_Match_Will_Start_Chat"            ""
            "SFUI_Notice_Warmup_Has_Ended"                ""

            
    //Coaching. Why would you want coaching for Idle?
            
    "CSGO_Coach_Join_"                            ""
            "CSGO_No_Longer_Coach"                        ""
            
            
    //Dominating / Killing Sprees
            
    "Player_You_Are_Now_Dominating"                ""
            "Player_You_Are_Still_Dominating"            ""
            "Player_On_Killing_Spree"                    ""
            "hostagerescuetime"                            ""
            
            
    //Buymenu!
            
    "csgo_instr_explain_buymenu"                ""
        
    }

    __________________

    Last edited by thetwistedpanda; 07-30-2014 at 00:26.
    thetwistedpanda is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 07-30-2014 , 00:17   Re: [CS:GO] Block "Saved Player" Text
    Reply With Quote #3

    Quote:
    Originally Posted by thetwistedpanda View Post
    Hmph! Bad Mitchell! I was a few hours away from releasing a portion of my CS:GO Idle plugin that does the same thing, but with a simple KV configuration that let users pick input which TextMsgs they wanted to block vs hardcoding one. You should totally save me the hassle of supporting such a plugin by tweaking yours a little *nudge nudge*. Also, Hi!
    if ya want me to i can! haha. i was looking at this cause i was just getting annoyed seeing a guy with "WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW" saving players etc.
    I can add an config like i do with Super Targeting!
    I would also need to make it Bitbuffer and Protobuf supported too then huh?
    Mitchell is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 07-30-2014 , 00:28   Re: [CS:GO] Block "Saved Player" Text
    Reply With Quote #4

    I threw a copy/paste in my above post, essentially what I was going to post after I removed my plugin-specific content, but since I'm not fancy on coding beyond fixing this plugin up, by all means use what you want so I don't have to help people with it xD.
    __________________
    thetwistedpanda is offline
    TUSK3N1337
    SourceMod Donor
    Join Date: Dec 2013
    Location: Sweden
    Old 07-30-2014 , 11:18   Re: [CS:GO] Block "Saved Player" Text
    Reply With Quote #5

    Thanks really needed.
    TUSK3N1337 is offline
    Send a message via Skype™ to TUSK3N1337
    Ejziponken
    AlliedModders Donor
    Join Date: Apr 2008
    Old 07-30-2014 , 11:38   Re: [CS:GO] Block "Saved Player" Text
    Reply With Quote #6

    It crashes the servers.
    Ejziponken is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 07-30-2014 , 14:04   Re: [CS:GO] Block "Saved Player" Text
    Reply With Quote #7

    Quote:
    Originally Posted by Ejziponken View Post
    It crashes the servers.
    A little bit more information would be nice about this.
    Like:
    sm version
    meta version

    any error logs... referencing this plugin.
    Mitchell is offline
    PresidentEvil
    AlliedModders Donor
    Join Date: Jun 2012
    Old 08-10-2014 , 21:02   Re: [CS:GO] Block "Saved Player" Text
    Reply With Quote #8

    Quote:
    Originally Posted by Mitchell View Post
    A little bit more information would be nice about this.
    Like:
    sm version
    meta version

    any error logs... referencing this plugin.
    i had a crash, these were the last things in the logs, when a player was killed by another player(possible saving a player)

    Code:
    L 08/10/2014 - 17:45:24: "johnyyboii<133><STEAM_1:1:93855704><CT>" say "rpg"
    L 08/10/2014 - 17:45:29: "Vulcano.<164><STEAM_1:1:59925726><TERRORIST>" [-3037 3749 -512] killed "[Forget]Alex58301<141><STEAM_1:0:47581943><CT>" [-2956 3756 -448] with "deagle" (headshot)
    Wrote minidump to: /servers/slayerssurf/csgo/addons/sourcemod/data/dumps/47ce9b2c-a699-445a-16f88d39-2e85ddd0.dmp
    ./exec_slayerssurf.run: line 318: 10546 Segmentation fault      (core dumped) $HL_CMD

    I didn't see any errors in the error logs referencing other plugins, thought it might be this plugin
    __________________

    Last edited by PresidentEvil; 08-10-2014 at 21:02.
    PresidentEvil is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 08-19-2014 , 08:56   Re: [CS:GO] Block "Saved Player" Text
    Reply With Quote #9

    Quote:
    Originally Posted by PresidentEvil View Post
    i had a crash, these were the last things in the logs, when a player was killed by another player(possible saving a player)
    ...
    I didn't see any errors in the error logs referencing other plugins, thought it might be this plugin
    I cant seem to replicate this crash, is it still happening, or did you remove the plugin after the crash?
    Mitchell is offline
    TUSK3N1337
    SourceMod Donor
    Join Date: Dec 2013
    Location: Sweden
    Old 08-19-2014 , 13:57   Re: [CS:GO] Block "Saved Player" Text
    Reply With Quote #10

    This plugin does not crash any server I have been running this since it was released and not crashed for me a single time, if anyone else gets crashes from this plugin then mabye another plugin is in conflict with this plugin.
    __________________
    TUSK3N1337 is offline
    Send a message via Skype™ to TUSK3N1337
    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 08:40.


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