Drixevel-Archive / Chat-Processor

A Sourcemod plugin which allows other plugins to add and manage chat related features.
GNU General Public License v3.0
58 stars 28 forks source link

Chat colors are not preserved #49

Open dragokas opened 5 years ago

dragokas commented 5 years ago

Hi,

when I'm using:

public Action CP_OnChatMessage(int& author, ArrayList recipients, char[] flagstring, char[] name, char[] message, bool& processcolors, bool& removecolors)
{
    Format(name, MAXLENGTH_NAME, "%s-post", name);
    processcolors = false;
    removecolors = false;
    return Plugin_Changed;
}

all chat string (including nickname) become white.

it's all ok, when I'm using:

Format(name, MAXLENGTH_NAME, "%s", name);

or when I manually add some color to that string.

Setting sm_chatprocessor_strip_colors to 0 doesn't help.

Game: Left 4 dead 1

MitchDizzle commented 5 years ago

make sure your name contains '\x01' or it wont apply any of the colors

dragokas commented 5 years ago

By default (without this plugin) my name displayed in chat as cyan. So, it is already have color tag.

Hexer10 commented 5 years ago

Afaik processcolors should be true in order to show the colors

dragokas commented 4 years ago

Hexer10, processcolors is true, but Chat Processor doesn't respect message default color tag. That's happen because message part is inherits nickname part of color tag.

If processcolors is true, Chat Processor should insert default color tag on its own, otherwise you will receive something like this: command_color