SendClientMessage Color bug - 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: SendClientMessage Color bug (
/showthread.php?tid=385658)
SendClientMessage Color bug -
new121 - 17.10.2012
When you do this
PHP код:
#define RED FF0000
#define COLOR_WHITE 0xFFFFFFFF
SendClientMessage(playerid,COLOR_WHITE,"blah{RED}blah");
it returns it like this in white text "blah{RED}blah" instead of changing colors it just displays it in the text. If you do you replace {RED} with {FF0000} it works fine though. It would be nice if we could define these colors, if I remember correctly you can do it with defined colors in dialogs.
AW: SendClientMessage Color bug -
ulbi1990 - 17.10.2012
because the first is hexadezimal and the second is rrggbb so it can't work how you amde it....
That isn't in any way a bug.
Re: AW: SendClientMessage Color bug -
new121 - 17.10.2012
Quote:
Originally Posted by ulbi1990
because the first is hexadezimal and the second is rrggbb so it can't work how you amde it....
That isn't in any way a bug.
|
if you can't understand what I meant here is a simpler way.
#define COL_RED FF0000
SendClientMessage(playerid,-1,"Blah{COL_RED}blah");
the above will not work it will say "Blah{COL_RED}blah"
SendClientMessage(playerid,-1,"Blah{FF0000} blah");
the above here will work, notice how the color code"FF0000" is the same as COL_RED is defined. Does that make more sense?
Re: SendClientMessage Color bug -
Drebin - 17.10.2012
pawn Код:
#define RED "{FF0000}"
#define COLOR_WHITE 0xFFFFFFFF
SendClientMessage(playerid,COLOR_WHITE,"blah"RED"blah");
This way it would work.