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

[Source 2013] Custom Chat Colors


Post New Thread Reply   
 
Thread Tools Display Modes
Nanochip
Senior Member
Join Date: Jan 2014
Old 02-09-2017 , 09:40   Re: [Source 2013] Custom Chat Colors
Reply With Quote #1301

If anyone doesn't feel like messing with flags or has a lot of admin groups that need a tag for each one, I've made this version which will give a tag based on the name of the admin group that the user is in.

You'll need to edit the custom-chatcolors.cfg config to be like this:
Code:
"admin_colors"
{
	"leader" // This will be the name of the group you're assigning the tag to (must match the corresponding group name in admin_groups.cfg).
	{
		"tag"				"[Leader] " // Notice how there is no need for a "flag" key anymore
		"tagcolor"			"#FF0000"
	}
	"council"
	{
		"tag"				"[Council] "
		"tagcolor"			"#32CD32"
	}
	"developer"
	{
		"tag"				"[devdevdev] "
		"tagcolor"			"#D185EE"
	}
	"moderator"
	{
		"tag"				"[Moderator] "
		"tagcolor"			"#000059"
	}
	"vip"
	{
		"tag"				"[VIP] "
		"tagcolor"			"#8AFFCA"
	}
	"default"   // Use 'default' if you want to give a tag to non-group members.
	{
		"tag"				"[User] "
		"tagcolor"			"#CCCCFF"
	}
}
And obviously upload my version:
Attached Files
File Type: sp Get Plugin or Get Source (custom-chatcolors.sp - 322 views - 16.4 KB)
File Type: smx custom-chatcolors.smx (12.0 KB, 376 views)
__________________

Last edited by Nanochip; 02-09-2017 at 09:42.
Nanochip is offline
away000
Veteran Member
Join Date: Sep 2010
Old 02-11-2017 , 11:28   Re: [Source 2013] Custom Chat Colors
Reply With Quote #1302

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.
Hey man, got this with ur version:

L 02/11/2017 - 11:28:29: SourceMod error session started
L 02/11/2017 - 11:28:29: Info (map "de_dust2") (file "errors_20170211.log")
L 02/11/2017 - 11:28:29: [SM] Unable to load plugin "cd_messages.smx": Native "BfWriteByte" was not found
L 02/11/2017 - 11:28:29: [SM] Exception reported: Config file missing
L 02/11/2017 - 11:28:29: [SM] Blaming: custom-chatcolors-csgo.smx
L 02/11/2017 - 11:28:29: [SM] Call stack trace:
L 02/11/2017 - 11:28:29: [SM] [0] SetFailState
L 02/11/2017 - 11:28:29: [SM] [1] Line 131, C:\Users\Mitch\Downloads\custom-chatcolors-csgo.sp::LoadConfig
L 02/11/2017 - 11:28:29: [SM] [2] Line 77, C:\Users\Mitch\Downloads\custom-chatcolors-csgo.sp::OnPluginStart
L 02/11/2017 - 11:28:29: [SM] Unable to load plugin "custom-chatcolors-csgo.smx": Error detected in plugin startup (see error logs)
__________________
away000 is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 02-11-2017 , 11:50   Re: [Source 2013] Custom Chat Colors
Reply With Quote #1303

Quote:
Originally Posted by away000 View Post
Hey man, got this with ur version:

L 02/11/2017 - 11:28:29: SourceMod error session started
L 02/11/2017 - 11:28:29: Info (map "de_dust2") (file "errors_20170211.log")
L 02/11/2017 - 11:28:29: [SM] Unable to load plugin "cd_messages.smx": Native "BfWriteByte" was not found
L 02/11/2017 - 11:28:29: [SM] Exception reported: Config file missing
L 02/11/2017 - 11:28:29: [SM] Blaming: custom-chatcolors-csgo.smx
L 02/11/2017 - 11:28:29: [SM] Call stack trace:
L 02/11/2017 - 11:28:29: [SM] [0] SetFailState
L 02/11/2017 - 11:28:29: [SM] [1] Line 131, C:\Users\Mitch\Downloads\custom-chatcolors-csgo.sp::LoadConfig
L 02/11/2017 - 11:28:29: [SM] [2] Line 77, C:\Users\Mitch\Downloads\custom-chatcolors-csgo.sp::OnPluginStart
L 02/11/2017 - 11:28:29: [SM] Unable to load plugin "custom-chatcolors-csgo.smx": Error detected in plugin startup (see error logs)
read the error message, you need the config from the main thread's post.
Mitchell is offline
away000
Veteran Member
Join Date: Sep 2010
Old 02-11-2017 , 11:55   Re: [Source 2013] Custom Chat Colors
Reply With Quote #1304

Quote:
Originally Posted by Mitchell View Post
read the error message, you need the config from the main thread's post.
Yeah, figured it out afterwards, now my problem is just the plugin xD
__________________
away000 is offline
Rossii
New Member
Join Date: Mar 2017
Old 03-09-2017 , 12:51   Re: [Source 2013] Custom Chat Colors
Reply With Quote #1305

HI.

I have problems with CCC.
When ever i die, the chat colors are messed up, they are not colored at all and the color-codes show as a part of my name.
And for those who dont have colored names, the chat message color is that of the team color.

Screenshots.
When someone have custom color and alive, everything looks good:
http://i.imgur.com/ueO2Z6t.jpg

But when he is dead:
http://i.imgur.com/Wm8Xvjh.jpg

When someone dont have chat color:
http://i.imgur.com/FfLbaH4.png

I hope someone can tell me how to fix this.
Thanks, have a good day!

Last edited by Rossii; 03-09-2017 at 12:52.
Rossii is offline
kamild1996
Senior Member
Join Date: May 2011
Old 04-06-2017 , 09:39   Re: [Source 2013] Custom Chat Colors
Reply With Quote #1306

Does anybody have an updated version of the ccc.inc file? The current one cannot be used because it screams about new-style declarations in every line...
kamild1996 is offline
zephylac
New Member
Join Date: Sep 2016
Old 04-09-2017 , 13:02   Problem with tagcolor
Reply With Quote #1307

Hi. I'm using CCC . It's working very well except for the tag. I figured out that when there is nothing before the tag, the color of the tag won't work whereas when there is some text before it would.

Do you have any clue about that?
Attached Thumbnails
Click image for larger version

Name:	image.png
Views:	325
Size:	58.3 KB
ID:	162005  
zephylac is offline
P4R4DiSi4C
AlliedModders Donor
Join Date: Nov 2016
Old 04-17-2017 , 11:12   Re: [Source 2013] Custom Chat Colors
Reply With Quote #1308

Hello guys,
I needed this plugin to work with the file: admin-groups and colors for CS:GO since it wasn't working when I set the SteamID and basing on the flags isn't that good...

So I took Mitchell modified version (for csgo colors) and this version (that takes groups instead of flags) and I compiled it, and it's working fine:

Mitchell with only csgo colors:
https://forums.alliedmods.net/showpo...postcount=1047

Nanochip with only based groups:
https://forums.alliedmods.net/showpo...postcount=1308

So you can remove anything related to flags in your config and use this .smx and don't forget to make your groups in: admin-groups.cfg

Credits to: Mitchell, Nanochip and Dr. McKay

Regards
Attached Files
File Type: smx custom-chatcolors.smx (12.3 KB, 219 views)
File Type: sp Get Plugin or Get Source (custom-chatcolors.sp - 201 views - 19.4 KB)
P4R4DiSi4C is offline
James76931
New Member
Join Date: Apr 2017
Old 04-23-2017 , 13:09   Issue regarding "Custom Chat Colors" and "Steam Group Admins"
Reply With Quote #1309

Hi,

I'm trying to get this plugin to work with another plugin called "Steam Group Admins" (https://forums.alliedmods.net/showthread.php?p=1352434) so that my Steam Group members can receive a prefix in chat. Sadly, I've ran into a bit of an issue.

I have the two plugins setup so that the Steam Group Admins plugin assigns a group member the "o" tag and Custom Chat Colors sets anyone with the "o" tag to have the Steam Group prefix. For some reason, the user will only receive their prefix once I reload the Custom Chat Colors plugin using the "sm_reloadccc" command. At the moment, I am using a cron plugin which runs that command on five minute intervals as a way around this issue, however I feel like there should be an alternate way to do this so that the second a user joins, their tag is visible in chat instead of having to wait for the reload command to execute on its five minute interval (which causes a nasty amount of spam in the logs and console).

If anyone knows a good way to fix this, please let me know
- James
James76931 is offline
mucheborec
Junior Member
Join Date: May 2017
Old 05-16-2017 , 14:40   Re: [Source 2013] Custom Chat Colors
Reply With Quote #1310

Hello!

I have 1 problem. I have Simple Chat Processor installed Mitchell's custom chat colors installed, set admins_groups.cfg, set custom-chatcolors.cfg but still I don't see title with colors. Btw I have installed admintag which you can see Admin Tag in TAB Score.

admins_groups.cfg
Code:
Groups
{
	/**
	 * Allowed properties for a group:
	 *
	 *   "flags"           - Flag string.
	 *   "immunity"        - Immunity level number, or a group name.
	 *						 If the group name is a number, prepend it with an 
	 *						 '@' symbol similar to admins_simple.ini.  Users 
	 *						 will only inherit the level number if it's higher 
	 *						 than their current value.
	 */
	"Default"
	{
		"immunity"		"1"
	}
	
	"Full Admins"
	{
		/**
		 * You can override commands and command groups here.
		 * Specify a command name or group and either "allow" or "deny"
		 * Examples:
		 * 		":CSDM"			"allow"
		 *		"csdm_enable"	"deny"
		 */
		 Overrides
		 {
		 }
		"flags"			"abcdefghiz"

		/* Largish number for lots of in-between values. */
		"immunity"		"99"
	}
}

"Groups"
{
    "OWNER"
    {
        "flags"           "z"
        "immunity"        "99"
    }
    "ADMIN"
    {
        "flags"        "acdefghjkm"
        "immunity"        "98"
    }
    "MANAGER"
    {
        "flags"        "acdefghjk"
        "immunity"        "97"
    }
    "MODERATOR"
    {
        "flags"        "acdefhjk"
        "immunity"        "96"
    }
    "K1NG"
    {
        "flags"        "acdefjk"
        "immunity"        "95"
    }
    "FAMOUS"
    {
        "flags"        "acfjk"
        "immunity"        "94"
    }
    "VIP"
    {
        "flags"        "afjk"
        "immunity"        "93"
    }
}
admins_simple.ini
Code:
//
// READ THIS CAREFULLY! SEE BOTTOM FOR EXAMPLES
//
// For each admin, you need three settings:
//  "identity"		"permissions"		"password"
//
// For the Identity, you can use a SteamID or Name.  To use an IP address, prepend a ! character.
// For the Permissions, you can use a flag string and an optional password.
//
// PERMISSIONS:
//  Flag definitions are in "admin_levels.cfg"
//  You can combine flags into a string like this:
//  "abcdefgh"
//
//  If you want to specify a group instead of a flag, use an @ symbol.  Example:
//  "@Full Admins"
//
//	You can also specify immunity values.  Two examples:
//	"83:abcdefgh"			//Immunity is 83, flags are abcdefgh
//	"6:@Full Admins"		//Immunity is 6, group is "Full Admins"
//
//	Immunity values can be any number.  An admin cannot target an admin with 
//	a higher access value (see sm_immunity_mode to tweak the rules).  Default 
//  immunity value is 0 (no immunity).
//
// PASSWORDS:
//  Passwords are generally not needed unless you have name-based authentication.
//  In this case, admins must type this in their console:
//
//   setinfo "KEY" "PASSWORD"
//
//  Where KEY is the "PassInfoVar" setting in your core.cfg file, and "PASSWORD"
//  is their password.  With name based authentication, this must be done before
//  changing names or connecting.  Otherwise, SourceMod will automatically detect
//  the password being set.
//
////////////////////////////////
// Examples: (do not put // in front of real lines, as // means 'comment')
//
//   "STEAM_0:1:16"		"bce"				//generic, kick, unban for this steam ID, no immunity
//   "!127.0.0.1"		"99:z"				//all permissions for this ip, immunity value is 99
//   "BAILOPAN"			"abc"	"Gab3n"		//name BAILOPAN, password "Gab3n": gets reservation, generic, kick
//
////////////////////////////////
 
"STEAM_0:0:195739924" "99:z"
"STEAM_0:1:182606069" "98:abcdefghijkmn"
custom-chatcolors.cfg
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"
{
	"OWNER" // This will be the name of the group you're assigning the tag to (must match the corresponding group name in admin_groups.cfg).
	{
		"tag"				"[OWNER]" // Notice how there is no need for a "flag" key anymore
		"tagcolor"			"{02}"
	}
	"ADMIN"
	{
		"tag"				"[ADMIN] "
		"tagcolor"			"{04}"
	}
	"MANAGER"
	{
		"tag"				"[MANAGER] "
		"tagcolor"			"{03}"
	}
	"MODERATOR"
	{
		"tag"				"[MOD] "
		"tagcolor"			"{06}"
	}
	"K1NG"
	{
		"tag"				"[K1NG] "
		"tagcolor"			"{07}"
	}
	"FAMOUS"   // Use 'default' if you want to give a tag to non-group members.
	{
		"tag"				"[FAMOUS] "
		"tagcolor"			"{08}"
	}
        "VIP"
        {
                "tag"                           "[VIP]"
                "tagcolor"                      "{09}"
        }
}
What Im doing wrong? And I dont have any errors during server startup, I only get this thing but idk if its error or not
Code:
L 05/16/2017 - 19:35:23: [simple-chatprocessor.smx] [SCP] Recognized mod [Counter-Strike: GO].
L 05/16/2017 - 19:35:23: [simple-chatprocessor.smx] [SCP] Loading translation file [scp.csgo.phrases].
L 05/16/2017 - 19:35:23: [SM] Exception reported: Invalid statement or db Handle 0 (error: 4)
mucheborec 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 22:55.


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