SA-MP Forums Archive
Making string of different colors. - 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: Making string of different colors. (/showthread.php?tid=614776)



Making string of different colors. - Maheerali - 12.08.2016

Код:
#define COLOR_GREEN 0x33AA33AA 
#define COLOR_RED 0xAA3333AA

new mainString[100];
new string1[10];
new string2[10];

format(mainString,128,"%s red   %s blue",COLOR_GREEN,COLOR_RED, string1, string2);
//Want string1 in green color and string 2 in red color
Please help


Re: Making string of different colors. - Konstantinos - 12.08.2016

https://sampwiki.blast.hk/wiki/Colour_Em...olor_embedding


Re: Making string of different colors. - Maheerali - 13.08.2016

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
I can't get my answer


Re: Making string of different colors. - Shinja - 13.08.2016

Go to http://www.colorpicker.com/
Get a color and copy the code with 6 Characters Ex: FF0000 for red
make it between "{ }" you'll get {FF0000}, Go back to your string and put everywhere you want color to be red
FFFFFF is white so we will use {FFFFFF} to get white again
PHP код:
format(mainString,128,"{FF0000}Red {FFFFFF}White"); 
ect...


Re: Making string of different colors. - Maheerali - 13.08.2016

Quote:
Originally Posted by Shinja
Посмотреть сообщение
Go to http://www.colorpicker.com/
Get a color and copy the code with 6 Characters Ex: FF0000 for red
make it between "{ }" you'll get {FF0000}, Go back to your string and put everywhere you want color to be red
FFFFFF is white so we will use {FFFFFF} to get white again
PHP код:
format(mainString,128,"{FF0000}Red {FFFFFF}White"); 
ect...
C++ is language i am using