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

[Source 2013] Custom Chat Colors


Post New Thread Reply   
 
Thread Tools Display Modes
secondtimesold
Senior Member
Join Date: Feb 2015
Old 04-06-2015 , 15:12   Re: [Source 2013] Custom Chat Colors
Reply With Quote #1071

This works fine but just like the original .smx it loads on initial server startup but once the map changes the plugin doesnt load.. it wont reload at all until the server is restarted.

Any tips to fix?


Quote:
Originally Posted by Mitchell View Post
Quick tip, since i didnt want to have your updater included i changed:

#include "mckayupdater.sp"
to
#tryinclude "mckayupdater.sp"

Edit: i have some good news

I have made the csgo version, with passive changes! it shouldnt break any modules

Try this, to use the colors make sure you do: {01} - {09}, {0A} - {0F}, {10} as the color of the tag/chat/name
see the colors/example here:
Spoiler

I'm also going to attach my test plugin
The CCC_GetColor will return a number 1-16 if it is a csgo chat color 01-10-0A-0F etc.
The reason i had to use {} is because KvGetString would return '7' instead of "07"

EDIT: i threw in an idea if {03} is used it will change the author to -1, not sure if you want to keep that idea, it so they can use the color purple. This will replace 'T' with purple though.
__________________
secondtimesold is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 04-07-2015 , 14:53   Re: [Source 2013] Custom Chat Colors
Reply With Quote #1072

Quote:
Originally Posted by secondtimesold View Post
This works fine but just like the original .smx it loads on initial server startup but once the map changes the plugin doesnt load.. it wont reload at all until the server is restarted.

Any tips to fix?
Any errors?
Mitchell is offline
secondtimesold
Senior Member
Join Date: Feb 2015
Old 04-07-2015 , 22:24   Re: [Source 2013] Custom Chat Colors
Reply With Quote #1073

It always says this error

KeyValues Error: LoadFromBuffer: missing { in file addons\sourcemod\configs\custom-chatcolors.cfg
(*{*),
[SM] Plugin [Source 2013] Custom Chat Colors reloaded successfully.
L 04/07/2015 - 22:24:05: rcon from "73.24.67.31:57799": command "sm plugins reload custom-chatcolors"


but even when it does on first load the plugin will work then once map changes the plugin does not reload until sever is fully restarted.
__________________
secondtimesold is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 04-07-2015 , 22:53   Re: [Source 2013] Custom Chat Colors
Reply With Quote #1074

Quote:
Originally Posted by secondtimesold View Post
It always says this error

KeyValues Error: LoadFromBuffer: missing { in file addons\sourcemod\configs\custom-chatcolors.cfg
(*{*),
[SM] Plugin [Source 2013] Custom Chat Colors reloaded successfully.
L 04/07/2015 - 22:24:05: rcon from "73.24.67.31:57799": command "sm plugins reload custom-chatcolors"


but even when it does on first load the plugin will work then once map changes the plugin does not reload until sever is fully restarted.
Seems like there is some missing opening ("{") or closing ("}") tags in your custom-chatcolors.cfg file.

Paste the contents of custom-chatcolors.cfg (in [CODE] or [PHP] tags) here on the forum, so we can have a look.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
secondtimesold
Senior Member
Join Date: Feb 2015
Old 04-07-2015 , 22:57   Re: [Source 2013] Custom Chat Colors
Reply With Quote #1075

Quote:
//
// ---------DO NOT EDIT ABOVE THIS LINE---------

{

{
"flag" "z"
"tag" "[AA|admin] "
"tagcolor" "{02}"
"namecolor" "{01}"
"textcolor" "{04}"
}

}
__________________

Last edited by secondtimesold; 04-07-2015 at 22:57.
secondtimesold is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 04-07-2015 , 23:05   Re: [Source 2013] Custom Chat Colors
Reply With Quote #1076

You were asked to use [CODE] or [PHP] tags, not quote tags.

Why did you delete the "admin_colors" line? And where is the group name?

PHP Code:
"admin_colors"
{
    
"Somegroupname"
    
{
    
"flag" "z"
    "tag"    "[AA|admin] "
    "tagcolor"    "{02}"
    "namecolor" "{01}"
    "textcolor" "{04}"
    
}

Following the directions in the original cfg file is very important.

PHP Code:
//        Custom Chat Colors is written by Dr. McKay (http://www.doctormckay.com)
//        Simple Chat Colors (Redux) is written by Antithasys
//        The configuration is very similar, so I've stolen Redux's documentation :P
//        
//        How to edit this file:
//        "admin_colors"                                        <--    Leave this alone
//        {                                                                <--    Add all groups/steamids after first bracket (Leave this alone)
//                                                                            
//            "STEAM_0:1:1234567"                        <--    Here is a steamid example with a tag (don't duplicate steamids)
//            {
//                "namecolor"        "#RRGGBB"                        <--    This is the color for the name (#RRGGBB in hex notation or #RRGGBBAA with alpha)
//                "textcolor"        "#RRGGBBAA"                        <--    This is the color of the text
//            }
//
//            "groupname"                                            <--    This can either be a steamid for a specific player, or a group name
//            {                                                            <--    Open the group
//                "flag"                "z"                            <--    This is the flag(s) assoicated with the group.  This field doesn't matter if the group name is a steamid
//                "tag"                "[admin]"                    <--    This is the text for the tag
//                "tagcolor"        "O"                        <--    This is the color for the tag
//                "namecolor"        "G"                        <--    This is the color for the name
//                "textcolor"        "T"                        <--    This is the color of the text
//            }                                                            <--    Close the group
//        }                                                                <--    Add all groups/steamids before last bracket (Leave this alone)
//
//        NOTE:
//        If you don't enter a steamid then the group name does not matter, it's just for your reference.
//
//        For colors, either a hex notation of a color (#RRGGBB or #RRGGBBAA) or one of the supported shortcuts (O - Olive, G - Green, T - Team) is required
//
//        --------ORDER OF OPERATIONS--------
//        
//        The order in which you place items in the config file matters.  Here is what determins what color they get:
//        1. SteamID
//            If there is a steamid present, it will always override everything.  If you put a steamid in twice
//            then the first entry (top to bottom) will be used. (I think, just don't do it!)
//        2. Groups
//            The plugin will search (top to bottom) for a postitive match for the flag string.  The player' flags
//            will be compared with the group flag character (NOTE: only one flag per group! "a" is okay, "ab" is NOT),
//            and if the player has the flag, it will stop there.
//            For example. Admins with the "ad" flags and donators with the "a" flag.  If you place the "a" flag group
//            above the "d" group then the admin will get the "a" colors. Order matters.
//
//        ---------DO NOT EDIT ABOVE THIS LINE---------
"admin_colors"

__________________

Last edited by ddhoward; 04-07-2015 at 23:07.
ddhoward is offline
secondtimesold
Senior Member
Join Date: Feb 2015
Old 04-07-2015 , 23:32   Re: [Source 2013] Custom Chat Colors
Reply With Quote #1077

i deleted the admin colors line because somewhere along the way reading through the thread someone said to do it

i reverted back and it started working on reload. ill report back if it still fails to load between maps.

thanks for the help thus far
__________________

Last edited by secondtimesold; 04-07-2015 at 23:34.
secondtimesold is offline
kanalumaddela
Junior Member
Join Date: Nov 2014
Location: U.S.
Old 05-22-2015 , 09:08   Re: [Source 2013] Custom Chat Colors
Reply With Quote #1078

this is my current setup and im trying to have donators have chat colors enabled while admins must type "#" before their messages to color chat. i have the distinguish module and toggle chat module also enabled
Code:
"admin_colors"
{
	"Owner"
	{
		"flag"				"z"
		"tag"				"[Owner] "
		"tagcolor"			"#00FFFF"
		"namecolor"			"#00FFFF"
	}
	"Admin"
	{
		"flag"				"b"
		"tag"				"[Admin] "
		"tagcolor"			"G"
		"namecolor"			"G"
		"textcolor"			"T"
	}
	"VIP"
	{
		"flag"				"o"
		"tag"				"[VIP] "
		"tagcolor"			"#9EC34FAA"
		"namecolor"			"#00CCFF"
		"textcolor"			"T"
	}
}
admin_overrides.cfg
Code:
sm_cvar sm_ccc_distinguish_tag "1"
sm_cvar sm_ccc_distinguish_name "1"
sm_cvar sm_ccc_distinguish_chat "1"
server.cfg
Code:
"sm_ccc_distinguish" "b"
kanalumaddela is offline
walkerjb
Member
Join Date: Jan 2015
Old 06-11-2015 , 11:18   Re: [Source 2013] Custom Chat Colors
Reply With Quote #1079

I fixed the problem which does not print the tag color when being alive. It is because the first phrase won't get colored if there is nothing before it (in this case "[Owner] WalkerJetBat: BlaBla.."). However if you add a space before the tag like " [Owner]*WalkerJetBat: BlaBla..", it works perfectly. Notice when you are dead it prints "*DEAD* [Owner] WalkerJetBat: BlaBla..", because it prints a phrase before the color tag, it works fine.

In short, adding a space before the tag actually fixes the problem.
walkerjb is offline
Porgand
Member
Join Date: Aug 2012
Old 06-19-2015 , 20:55   Re: [Source 2013] Custom Chat Colors
Reply With Quote #1080

I tried the orginal one, that dosen't work and then I put on the Mitchell edit for CS:GO (https://forums.alliedmods.net/showpo...postcount=1047), that works but always when server restart the tags is gone, I need reload the plugin and when someone new coming server I again need reload the plugin (sm_reloadccc)
Someone can help?
__________________
Less words, more action!
Porgand is offline
Send a message via Skype™ to Porgand
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 16:55.


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