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)
I simply Format(): name, message and additionally if I want the message to be shown to everyone: recipients.Clear(); and loop through all clients
I'd like to do that but I can't be limited by the name limitation of 64 characters. That's why my code is the way it is, it bypasses the name length limitation entirely.
I'd like to do that but I can't be limited by the name limitation of 64 characters. That's why my code is the way it is, it bypasses the name length limitation entirely.
tldr; He wants to take away space from the message field and put it into the name field for bigger tags with more colors.
That code spamming the sh*t out of the chat, old chat processor redux version that was all alright
Tested your code against the latest version and it seems to run fine. If you're running an old version of Chat-Processor or you're running Simple Chat Processor, I'd suggest you delete those and make sure you have the latest copy of Chat-Processor. (Latest version should be 1.0.9)