I don't think CS:GO even supports RGB/RGBA colors. I did explain in my prior post how my Chat-Processor Tags plugin will handle CS:GO and what color options you'll have immediately available to you.
But I do plan on learning more about how CS:GO handles colors, setting up a CS:GO sourcemod testing server and then seeing if I can get RGB colors working in CS:GO or not.
Updated how the returns and the post-hook function work to add compatibility for a project abrandnewday (404) is making.
Merged some changes to the include from Shavit to include the change for the handle of the recipients array from 'Handle' to 'Arraylist' and the removal of useless lines.
Brief Overview of the returns for the pre-hook:
plugin_continue/plugin_stop = Stop message
plugin_changed = Print one message with the changes.
plugin_handled = Print no message with the changes but fire the forward with the data anyways.
Updated how the returns and the post-hook function work to add compatibility for a project abrandnewday (404) is making.
Merged some changes to the include from Shavit to include the change for the handle of the recipients array from 'Handle' to 'Arraylist' and the removal of useless lines.
Brief Overview of the returns for the pre-hook:
plugin_continue/plugin_stop = Stop message
plugin_changed = Print one message with the changes.
plugin_handled = Print no message with the changes but fire the forward with the data anyways.
Excellent In regards to the project I'm making, it's the Chat-Processor Tags plugin I described in a prior post. I'm still ironing out a few final kinks and I need to update the config file with information on CS:GO color strings because I've learned some new things about them (thank you Hop for providing me with some info, and redwerewolf for pointing out to me that those formatting codes that Hop provided me were already defined in colorvariables.inc).
Plus, I need to test Chat-Processor Tags on CS:GO which is why I've set up a CS:GO server just for testing my SourceMod plugins out to make sure they work across many games, and I plan on setting up servers for every game SourceMod supports so I can actually include multi-engine handling in anything I make and publicly release in the future.
can confirm double messages fixed also in CS:S (they existed in the previous version)
Can you show me a code snippet of how you're printing the messages because with the method I'm using (for longer multicolored chat tags) in TF2 just results in this weirdness (weirdness in the first image is from a private chat tag plugin I had commissioned from redwerewolf, second image is from chat-processor-tags, the plugin I'm working on and trying to fix this bug in so I can release it publicly)
The entirely red line is visible to everyone on the server. The multiple copies where my name is green (that's a weird "teamcolor" bug where \x03 in TF2 is apparently green and not teamcolored) are only visible to me.
The same thing happens for everyone on the server. They see one copy of the message they sent with the green name for every player on the server (so if there's 5 people on, 5 copies are sent) plus one final copy where the coloring is flatout broken and the entire message is teamcolored.
The same thing happens with the Chat-Processor Tags plugin I'm working on:
As you can see, multicolored tags that don't cut half your name off are working just fine in the plugin, but the message gets sent once for every client on the server.
if(CheckForward(iAuthor, strNewMessage, CPT_NameColor)) { if(StrEqual(g_strUsernameColor[iAuthor], "T", false)) { // Team Colored Format(strNewName, MAXLENGTH_256, "\x03%s", strNewName); } if(StrEqual(g_strUsernameColor[iAuthor], "G", false)) { // Green Format(strNewName, MAXLENGTH_256, "\x04%s", strNewName); } else if(StrEqual(g_strUsernameColor[iAuthor], "O", false)) { // Olive Format(strNewName, MAXLENGTH_256, "\x05%s", strNewName); } else if(strlen(g_strUsernameColor[iAuthor]) == 6) { // RGB Format(strNewName, MAXLENGTH_256, "\x07%s%s", g_strUsernameColor[iAuthor], strNewName); } else if(strlen(g_strUsernameColor[iAuthor]) == 8) { // RGBA Format(strNewName, MAXLENGTH_256, "\x08%s%s", g_strUsernameColor[iAuthor], strNewName); } else { // Team-Colored by default // lol doesn't work, comes out as green Format(strNewName, MAXLENGTH_256, "\x03%s", strNewName); } } else { // Team-Colored by default // lol doesn't work, comes out as green Format(strNewName, MAXLENGTH_256, "\x03%s", strNewName); }
// Check if the tag color string is above 0 characters if(strlen(g_strTagColor[iAuthor]) > 0 && CheckForward(iAuthor, strNewMessage, CPT_TagColor)) { // Check if tag length is more than 0 if(strlen(g_strTag[iAuthor]) > 0) { if(strlen(g_strTagColor[iAuthor]) == 6) { // RGB Format(strNewName, MAXLENGTH_256, "\x07%s%s%s", g_strTagColor[iAuthor], g_strTag[iAuthor], strNewName); } else if(strlen(g_strTagColor[iAuthor]) == 8)