SA-MP Forums Archive
Colors in within quote marks - 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: Colors in within quote marks (/showthread.php?tid=522510)



Colors in within quote marks - Jimmy0wns - 27.06.2014

So, I've been searching around for a while but couldn't find anything.
Isn't there a way you could change the color of text within the quote marks. e.g:
pawn Код:
SendClientMessage(playerid, -1, "changing the color to ""COLOR_BLUE"" right now");



Re: Colors in within quote marks - DeStunter - 27.06.2014

you have to use RGB color codes {rrggbb}
pawn Код:
#define COLOR_BLUE "{0000ff}"
SendClientMessage(playerid, -1, "change the color to"COLOR_BLUE" right now");



Re: Colors in within quote marks - sammp - 27.06.2014

#define WHITE "{FFFFFF}"

Pretty sure that works


Re: Colors in within quote marks - Eth - 27.06.2014

you can do it for sure...
pawn Код:
SendClientMessage(playerid,-1,"changing the color to {FF0000}Red right now");
you can see the list of colors here :
pawn Код:
#define COL_EASY           "{FFF1AF}"
#define COL_WHITE          "{FFFFFF}"
#define COL_BLACK          "{0E0101}"
#define COL_GREY           "{C3C3C3}"
#define COL_GREEN          "{6EF83C}"
#define COL_RED            "{F81414}"
#define COL_YELLOW         "{F3FF02}"
#define COL_ORANGE         "{FFAF00}"
#define COL_LIME           "{B7FF00}"
#define COL_CYAN           "{00FFEE}"
#define COL_LIGHTBLUE      "{00C0FF}"
#define COL_BLUE           "{0049FF}"
#define COL_MAGENTA        "{F300FF}"
#define COL_VIOLET         "{B700FF}"
#define COL_PINK           "{FF00EA}"
#define COL_MARONE         "{A90202}"
#define COL_CMD            "{B8FF02}"
#define COL_PARAM          "{3FCD02}"
#define COL_SERVER         "{AFE7FF}"
#define COL_VALUE          "{A3E4FF}"
#define COL_RULE           "{F9E8B7}"
#define COL_RULE2          "{FBDF89}"
#define COL_RWHITE         "{FFFFFF}"
#define COL_LGREEN         "{C9FFAB}"
#define COL_LRED           "{FFA1A1}"
#define COL_LRED2          "{C77D87}"
just copy the code from the ""


Re: Colors in within quote marks - Jimmy0wns - 27.06.2014

Ah, both thanks a lot, recently got back to scripting. (:


Re: Colors in within quote marks - YoungKris - 27.06.2014

Also, you don't have to globally #define it, if you're making a command for example you could do this:

pawn Код:
CMD:text(playerid, params[])
{
    #define COLOR_BLUE "{0000ff}"
    SendClientMessage(playerid, -1, "change the color to"COLOR_BLUE" right now");
    #undef COLOR_BLUE
    return 1;
}