Hex Colour[+Help]
#1

when add scrip, Only show 6 zero the end of the hex

SendClientMessageEx(playerid, 9276927, string);

Can i help me ?
Reply
#2

Not sure what your problem is, however it should be like #9276927FF
Reply
#3

How ?
Reply
#4

goto ****** , search the color name with hex code eg : Black color hex code, etc
Reply
#5

I use Hex downloaded from the database

i need for example
Reply
#6

pawn Код:
#define COLOR_BLACK #00000000 // 6 digits, followed by 2 transparency specifiers.

SendClientMessage(playerid, COLOR_BLACK, "This is a color..");
Quote:
Originally Posted by wiki.sa-mp.com
RR - Two values for the red (Where FF is max, and 00 is the lowest).
GG - Two values for the green (Where FF is max, and 00 is the lowest).
BB - Two values for the blue (Where FF is max, and 00 is the lowest).
AA - Two values for the transparency (Where FF is max, and 00 is the lowest).
Hope this helps.
Reply
#7

Me use the colors of this for one looks formula colors of Đаi delivery thanh and it is tаi tử databases after transferred guide words (me going: 0x8D8DFFFF it will be saved on databases: 9276927), but on me use the direct word 9276927 in colors, Only show 6 zero the end of the hex
sorry, Bad english
Reply
#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
#9

when I use the format

Код:
new color = 9276927;
Here is the hex to RPG when I type in a dialog it is stored on the database as integers
hex triplet #8d8dff has decimal index of: 9276927

Код:
{%6x}
for example

Код:
format(szDialogStr, sizeof szDialogStr, "{%6x}this is a color", color);
it works

I use it to send the RADIO that does not work switch to a different color than the part I bolded 9276927
Код:
format(szDialogStr, sizeof szDialogStr, "this is a color",);
Код:
SendClientMessageEx(playerid, color, szDialogStr);
it does not work
Reply
#10

i dont define colors i use them like this:

SendClientMessageEx(playerid, 0x927692FF, string);

only 6 digit works!


in front of 927692 i put 0x and at last i put FF like this 0x927692FF

test it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)