SA-MP Forums Archive
Problem with Color codes inside a clientmessage - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with Color codes inside a clientmessage (/showthread.php?tid=463909)



Problem with Color codes inside a clientmessage - knackworst - 14.09.2013

Hello
I've got a problem with a clientmessage.
I use different color codes withing the message to clear things up.

Here's the code:
pawn Код:
format(str, sizeof(str), "[RACE]%s(%d) {00FF00}has set a new server record ({AAFFAA}%s{00FF00}) on the race: {AAFFAA}%s{00FF00} ({AAFFAA}/races{00FF00})", playername, playerid, ReturnTime(RaceInfo[raceid][racetime]), RaceInfo[raceid][racename]);
                    SendClientMessageToAll(COLOR_GREEN, str);
However when this clientmessage should be shown nothing happens...
So I started trying to figure out why that was and I found out that when I deleted all the color codes so the {...} in the message it worked fine...
Does anybody know how I can fix this?
Thanks in advance =)