[HELP] Multiple colors 1 line? - 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: [HELP] Multiple colors 1 line? (
/showthread.php?tid=296884)
[HELP] Multiple colors 1 line? -
MadalinX5 - 13.11.2011
Hello

I'm trying to create a message:
Код:
SendClientMessage(playerid, COLOR_GREEN, "System: Online");
But I want to give the color Yellow to "System:" and green to "Online" like 2 colors in 1 line. How can I do this?
Thank you,
MadalinX5
Re: [HELP] Multiple colors 1 line? -
Kostas' - 13.11.2011
pawn Код:
//At The Top
#define COLOR_YELLOW 0xFFFF00FF
Your message
pawn Код:
SendClientMessage(playerid, COLOR_YELLOW, "System: {00FF00}Online");
Note: Green is 0x00FF00FF. Just use {} and the RGB In it {00FF00}
Re: [HELP] Multiple colors 1 line? -
MadalinX5 - 13.11.2011
Quote:
Originally Posted by Kostas'
pawn Код:
//At The Top #define COLOR_YELLOW 0xFFFF00FF
Your message
pawn Код:
SendClientMessage(playerid, COLOR_YELLOW, "System: {00FF00}Online");
Note: Green is 0x00FF00FF. Just use {} and the RGB In it {00FF00}
|
Can't I use my defines?
pawn Код:
SendClientMessage(playerid, COLOR_YELLOW, "System: {COLOR_GREEN}Online");
Re: [HELP] Multiple colors 1 line? -
Kostas' - 13.11.2011
You can use the RGB code from your defines.
For example this is orange
pawn Код:
#define COLOR_ORANGE 0xFF9600FF
You need to take the RGB from it.
R = FF
G = 96
B = 00
And you can use it inside the {}
Like {FF9600}
AW: [HELP] Multiple colors 1 line? -
Babul - 13.11.2011
Код:
#define green 00ff00
//filterscriptinit
new test[128];
format(test,sizeof(test),"123 {"#green"}456");
SendClientMessageToAll(0xffffffff,test);
just whipped that together, and.. it works
Re: [HELP] Multiple colors 1 line? -
Killa[DGZ] - 13.11.2011
Quote:
Originally Posted by MadalinX5
Can't I use my defines?
pawn Код:
SendClientMessage(playerid, COLOR_YELLOW, "System: {COLOR_GREEN}Online");
|
no, i think you would need to double up on your defines in order for that to work.
pawn Код:
#define COLOR_GREEN 0x00FF00AA
#define TEXT_GREEN 00FF00
no mb!, use Babul's example
Re: [HELP] Multiple colors 1 line? -
CSSI - 13.11.2011
pawn Код:
#define TEXT_GREEN "{00FF00}"
SendClientMessage(playerid, COLOR_YELLOW, "System: "TEXT_GREEN"Online");