Colour problem :P
#1

Hey all! I was doing some scripting, creating a bot for my server, but now i'm just wodering, i got this line of code:
pawn Код:
SendClientMessage(playerid, COLOR_YELLOW, "FT Bot: You have been healed!");
Now, i was wondering how i make this so it will look like FT Bot: is coloured yellow, and You have been healed! is green.
Thanks!
Reply
#2

pawn Код:
SendClientMessage(playerid, COLOR_YELLOW, "FT Bot: "#COL_GREEN"You have been healed!");
And define this ontop of your script under your includes:
pawn Код:
#define COL_GREEN          "{6EF83C}"
// Misunderstood I've edit my post.
Reply
#3

pawn Код:
SendClientMessage(playerid, COLOR_GREEN, "{COLOR1}FT Bot: {COLOR2}You have been healed!");
COLOR1 = hex code for whatever color
COLOR2 = hex code for whatever

E.g. white would be {FFFFFF}

Get the hex codes from:
Quote:

This forum requires that you wait 120 seconds between posts. Please try again in 6 seconds.

Reply
#4

Thanks! you really helped me out, i've been figuring this for 30 mins already LOL, i should've gone here in the first place!
Reply
#5

No problem Btw here are some codes I'm using:
pawn Код:
//-----[0.3c Color defines]-----
#define COL_EASY           "{FFF1AF}"
#define COL_DGREEN         "{0E8C00}"
#define COL_LOGIN          "{98E090}"
#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         "{F9B857}"
#define COL_LIME           "{B7FF00}"
#define COL_CYAN           "{00FFEE}"
#define COL_LBLUE          "{298ACF}"
#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         "{9FE4AA}"
#define COL_LRED           "{DA7272}"
#define COL_LRED2          "{C77D87}"
#define COL_DYELLOW        "{FAFA52}"
#define COL_BROWN          "{8C703F}"
#define COL_SBLACK         "{474747}"
#define COL_SGREY          "{ADADAD}"
#define COL_SBLUE          "{3660D1}"
#define COL_ACTION         "{E087D9}"
#define COL_DBLUE          "{3030BA}"
#define COL_DGREY          "{5E5E5E}"
Then you can easy add them like:
pawn Код:
"#COL_BROWN"
Goodluck.
Reply
#6

Oh wow, i added them to my gamemode :P thanks for it!

EDIT:
i also had these kind of codes, is there any difference with yours?
pawn Код:
#define COLOR_RED 0xAA3333AA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_YELLOW 0xFFFF00AA
Reply
#7

Those codes are 0x.... You can use them like:

pawn Код:
SendClientMessage(playerid, COLOR_HERE, "FT Bot: You have been healed!");
You can't use those "#COL_GREEN" inside the SendClientMessage parameters.
Reply
#8

I see, thanks for the useful info.
Reply
#9

Again, no problem and goodluck
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)