Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chat colors are not preserved #49

Open
dragokas opened this issue Apr 8, 2019 · 4 comments
Open

Chat colors are not preserved #49

dragokas opened this issue Apr 8, 2019 · 4 comments

Comments

@dragokas
Copy link
Contributor

dragokas commented Apr 8, 2019

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
Copy link

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

@dragokas
Copy link
Contributor Author

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

@Hexer10
Copy link
Contributor

Hexer10 commented Apr 13, 2019

Afaik processcolors should be true in order to show the colors

@dragokas
Copy link
Contributor Author

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

dragokas added a commit to dragokas/Chat-Processor that referenced this issue Apr 20, 2020
olokos pushed a commit to olokos/Chat-Processor that referenced this issue Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants