(Strings) How to color sections of the string - 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: (Strings) How to color sections of the string (
/showthread.php?tid=443128)
(Strings) How to color sections of the string -
Th3b3ast5 - 10.06.2013
So, I have a command which issues a server restart, It says "% has issued a server restart" however I would like "Server Restart" to be a different color, and the color of the string is Lightred, so How can I do so?
Respuesta: (Strings) How to color sections of the string -
Parka - 10.06.2013
Colors
pawn Код:
//Example:
SendClientMessage( playerid, -1, "{00FF00}Server {0000FF}Restart");
//0000FF is red
//00FF00 is lime
Re: (Strings) How to color sections of the string -
Th3b3ast5 - 10.06.2013
Yes, but I'm using a string, which afterwards runs SendClientMessageToAll, so How do I pinpoint where I would like the different color?
Код:
format(string, sizeof(string), "AdmCmd: %s has issued a Server Restart, it will occur in 30 seconds. Be sure to /park your vehicle(s)!", RPN(playerid));
SendClientMessageToAll(COLOR_LIGHTRED, string);
Re: (Strings) How to color sections of the string -
DeMoX - 10.06.2013
pawn Код:
format(string, sizeof(string), "AdmCmd: %s {FFFFFF}has {FF0000}issued a Server Restart, {00FF00}it will occur in 30 seconds. Be sure to /park your vehicle(s)!", RPN(playerid));
SendClientMessageToAll(COLOR_LIGHTRED, string);
Just use it, like when you're using SendClientMessage.
Note: If you want to use a GameTextForPlayer you must use:
~g~, ~r~ ...etc
Re: (Strings) How to color sections of the string -
Pooh7 - 10.06.2013
You just insert the color code at where you want.