Just starting out with SourcePawn. Trying to learn how to make commands and playing around with chat colors. Copied some code from the wiki to test out how it works. The lines that were copied from the wiki, explaining how the color codes work - those lines work and the color changes, but when I try to make my own lines with some text and change the color, the text shows, but the color does not change.
This is the code:
Code:
public void OnPluginStart()
{
RegConsoleCmd("sm_test", Command_Test);
PrintToServer("Server: Main server file sucesfully started!");
}
public Action Command_Test(int client, int args)
{
PrintToChatAll("\x011\x022\x033\x044\x055\x066\x077\x088\x099\x0AA\x0BB\x0CC\x0DD\x0EE\x0FF"); // Color changes
PrintToChatAll("\x01 1 .. \x02 2 .. \x03 3 .. \x04 4 .. \x05 5 .. \x06 6 .. \x07 7 .. \x08 8"); // Color changes
PrintToChatAll("\x02Command works!1"); // Color does not change (Line I added)
PrintToChatAll("\x04Command works!2"); // Color does not change (Line I added)
//return Plugin_Handled;
}
Have no idea why the color does not change where I have written my own text.