Hex Colour[+Help]
#8

Quote:
Originally Posted by Isolated
Посмотреть сообщение
pawn Код:
#define COLOR_BLACK #00000000 // 6 digits, followed by 2 transparency specifiers.

SendClientMessage(playerid, COLOR_BLACK, "This is a color..");


Hope this helps.
Excuse me, but have you even tried your code? The second parameter is INTEGER, not a string.

tvt, would you mind to explain what you want? Let's say you want to show a message with red color (defining it makes it easier for the most users).

pawn Код:
#define COLOR_RED 0xFF0000FF
pawn Код:
SendClientMessage(playerid, COLOR_RED, "This is a color..");
You can convert colours by using any online converter (I use: http://www.javascripter.net/faq/rgbtohex.htm)

Change the values of R G B (0-255) and at the right side, it will give the 6 digits for the color. You can add 0x before and FF after and you're done.

For example, FFFF00 is (255 255 0, which is yellow). Doing 0xFFFF00FF is yellow.

EDIT: You edited your post. Okay, like I said hex ARE numbers. Even if you use that number instead, it will still be the color you wanted to.
Reply


Messages In This Thread
Hex Colour[+Help] - by tvt - 16.10.2013, 06:41
Re: Hex Colour[+Help] - by Isolated - 16.10.2013, 06:50
Re: Hex Colour[+Help] - by tvt - 16.10.2013, 07:05
Re: Hex Colour[+Help] - by newbie scripter - 16.10.2013, 07:15
Re: Hex Colour[+Help] - by tvt - 16.10.2013, 07:18
Re: Hex Colour[+Help] - by Isolated - 16.10.2013, 07:49
Re: Hex Colour[+Help] - by tvt - 16.10.2013, 09:56
Re: Hex Colour[+Help] - by Konstantinos - 16.10.2013, 10:05
Re: Hex Colour[+Help] - by tvt - 16.10.2013, 10:22
Re: Hex Colour[+Help] - by Akcent_Voltaj - 16.10.2013, 13:18

Forum Jump:


Users browsing this thread: 1 Guest(s)