Colors in within quote marks
#1

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");
Reply
#2

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

#define WHITE "{FFFFFF}"

Pretty sure that works
Reply
#4

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 ""
Reply
#5

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

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)