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

[ANY] Zeta Chat Manager


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mitchell
~lick~
Join Date: Mar 2010
Plugin ID:
6519
Plugin Version:
1.1.0
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    More advanced custom-chatcolor plugin that allows defining different aspects of a user's chat (Prefix, Name, Suffix, Text)
    Old 04-12-2019 , 12:03   [ANY] Zeta Chat Manager
    Reply With Quote #1

    Zeta Chat Manager

    An enhanced chat color plugin that allows clients be flexible about their chat's prefix, prefix+color, name color, suffix+color and text color. Requires Cider-Chat-Processor, Chat Processor. (Or god forbid simple-chatprocessor).

    This works well with GroupAssigner, but isn't required.

    Don't expect this to be easier to setup than custom-chat-colors plugin, this is more advanced for a reason. It allows players to toggle on and off certain aspects of their tags and choose tags that the server operator allows them to have.

    This currently does not allow players to individually adjust the color aspects of their tags but it is planned later.

    For any issues post in the Alliedmods forum or create GitHub issue marking what's wrong and any information to help solve your issue faster.
    Contributions are welcome via PR, however my code style will not change (4 space indent, brackets on the same line as the condition, and no one line statements).


    Required Plugins
    You must choose what processor plugin you want to have loaded. (I won't be offended if you don't use mine, i'll only be offended if you use choose scp).

    Mitchell's Cider-Chat-Processor - https://forums.alliedmods.net/showthread.php?p=2646798
    Drixevel's Chat-Processor - https://forums.alliedmods.net/showthread.php?p=2448733
    minimoney1's Simple Chat Processor (Not recommended) - https://forums.alliedmods.net/showthread.php?p=1820365

    Only one of these are needed, installing multiple will probably do some weird shit.

    Server Operator Config
    Code:
    // Each Profile is separated with commons, ex: sm_zeta_profile "Murder,FF2,Test Server"
    sm_zeta_profile ""
    Chat Config
    Code:
    //To save space after the config is loaded into memory make sure any blank KeyValues are commented out or removed.
    "ZetaChatConfig"
    {
        "default"
        {//Default group which contains the config for all the servers.
            "default" //Unique ID, used when saving in in client prefs.
            { // 'default' is the chat tag that will be specificall used for all players until they use the command to change it.
                "n"   "{03}" //Name color (This is also used for Spectators.)
                "nd"    "" //Name color while dead.
                "n2"    "" //Name color for team 2 (RED) (Blank will fallback to the normal "n" etc)
                "nd2"   "" //Name color for team 2 (RED) while dead (Falls back to "nd" etc.)
                "n3"    "" //Name color for team 2 (BLU)
                "nd3"   "" //Name color for team 2 (BLU) while dead
                
                //All of these also have team specific colors just add '2' or '3' to the end of the key.
                "t"     "" //Text color
                "td"    "" //Text color while dead
    
                "p"     "" //Prefix
                "pd"    "" //Prefix while dead
    
                "s"     "" //Suffix
                "sd"    "" //Suffix while dead
    
                //Name, Text, Prefix and Suffix are all saved in client prefs as individual values.
                //  The option in the menu will only display if there is a value set.
                //  This default section will always display in the menu to allow players to unset their tags.
                
                //Access Identifiers.
                //Checks to see if the player has access to this override. RECOMMENDED way of determining if a user has access to this section. 
                //You can use command overrides to give users access to this command, overrides can be group based also.
                "ovrd" ""
                // Can also be STEAM_XXXX or "@Group Name", these are not recommended if you're defining more than one section for a certain person/group.
                // GroupHandlerAPI and GroupAssigner is great for giving players a certain group, even if it doesn't exist in admin_groups.cfg!
                //   GroupHandlerAPI will automatically assign the group to have the override of the same name of the group. i.e. "Badass Admins" group name will have the override "Badass Admins" added to it.
    
                "disp" "Default" //The display that shows in the menu and when you equip it. Doesn't have to be unique, so you can have multiple that have the same display.
            }
        }
        "Server 1"
        {//Server profile, anything within this profile will blend into the default group. 
         // Depending on the convar, the profile will load first, then the next. Default profile is loaded last.
         // Duplicate enteries will use the top level one, i.e. does not override.
            "default"
            { //Sets default name for alive and dead.
                "n"     "{07}cccccc"
                "nd"    "{07}999999"
                "disp"  "Default"
            }
        }
    }
    Developer Functions
    Code:
    #define ZETACHAT_NONE       0
    #define ZETACHAT_PREFIX  (1 << 0)
    #define ZETACHAT_NAME    (1 << 1)
    #define ZETACHAT_SUFFIX  (1 << 2)
    #define ZETACHAT_TEXT    (1 << 3)
    #define ZETACHAT_ALL     ZETACHAT_PREFIX|ZETACHAT_NAME|ZETACHAT_SUFFIX|ZETACHAT_TEXT
    
    /**
     * Sets the default chat of the player
     * typeBits is ZETACHAT_* defines above.
     * Should only be used if the clientprefs are already cached for the player.
     */
    native bool Zeta_SetDefault(int client, int typeBits, char[] chatKey);
    Releases (Plugin)
    GitHub (Source)
    Mitchell is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 04-12-2019 , 12:05   Re: [ANY] Zeta Chat Manager
    Reply With Quote #2

    If you're wondering why there isn't flag assigning then you need to look up on how to use command_overrides. You can define an override and assign it a flag. So much better than checking if a player has a flag or not.

    For any feature requests or issues i'll accept a post here or on the GitHub project under issues.
    Mitchell is offline
    sneaK
    SourceMod Moderator
    Join Date: Feb 2015
    Location: USA
    Old 04-12-2019 , 12:29   Re: [ANY] Zeta Chat Manager
    Reply With Quote #3

    Are there any future plans to allow players to set their own custom tags, instead of using predefined ones?
    __________________
    sneaK is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 04-12-2019 , 12:47   Re: [ANY] Zeta Chat Manager
    Reply With Quote #4

    Quote:
    Originally Posted by sneaK View Post
    Are there any future plans to allow players to set their own custom tags, instead of using predefined ones?
    Possibly, my intention was eventually get around to having 'replaceable' format tags so players can use either their own custom string or defined strings that would fit into a specific entry.
    I.E. in zetachatconfig.cfg:
    "p" "[{%1}] "

    And the player could define what {%1} is replaced with so it would appear as in chat:
    [Mitch] mitch: Test Message

    However I'm not sure how i'd want to do something like that, possibly just making it one string would be good enough.
    I also wanted to add like a Color adjuster so you can have a defined tag also include a character that would be replaced with the client's specific color. Which seems easier to do, but possibly added more heft to the plugin, which means I'll probably add in forwards and natives to this plugin later so a subplugin can do that and store those things.

    This was just the initial release because I've been sitting on the code in my harddrive for a while.
    If I do add in more developer natives etc I'll probably make a sql version that adds to the config etc.

    Last edited by Mitchell; 04-12-2019 at 12:48.
    Mitchell is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 04-12-2019 , 17:31   Re: [ANY] Zeta Chat Manager
    Reply With Quote #5

    Release v1.1.2 Changelog:
    • Fixed up Zeta_DefaultChat,
      • Passing in -1 will set all the chat types, Prefix, Name, Suffix, Text.
      • Proper checking if the passed in value is configured and only override if it's of the same type.
    • Added root command to set the chat cookie value of a certain steam2: sm_setchat <steam2> <pnst> <chat unique id>
    • Adjusted the menu to hide the set value if the player no longer has access to it.
    • Prevent player from setting their chat to Default if it's the only option. - This prevents players that may have temporarily lost their only tag to not override their value if they suddenly regain it.

    Release v1.1.3 Changelog:
    • Fixes issue with default chat tag not being converted to unicode and displaying as {03}
    • Adds team color to players name if their tag is invalid. A backup method.

    Download:
    Github Tag

    Last edited by Mitchell; 04-12-2019 at 18:47.
    Mitchell 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 15:50.


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