How to save & load hex color on MySQL?
#9

Colors are numbers, and numbers can be changed into any notation you'd like.

Suppose you have this: 0x0000FF99, which is a blue color. If you save it as integer in MySQL you would get 65433 as a value for that field, which is the correct decimal value for that hex color. Doing this works:
pawn Код:
SendClientMessage(playerid, 65433, "This message is blue!");
As does this:
pawn Код:
printf("Hex: %08x - Decimal: %d", 65433, 0x0000FF99);
Reply


Messages In This Thread
How to save & load hex color on MySQL? - by T0pAz - 08.02.2012, 10:50
Re: How to save & load hex color on MySQL? - by Vince - 08.02.2012, 11:44
Re: How to save & load hex color on MySQL? - by T0pAz - 08.02.2012, 11:50
Re: How to save & load hex color on MySQL? - by Vince - 08.02.2012, 13:01
Re: How to save & load hex color on MySQL? - by CaHbKo - 08.02.2012, 13:06
Re: How to save & load hex color on MySQL? - by T0pAz - 08.02.2012, 13:27
Re: How to save & load hex color on MySQL? - by Niko_boy - 08.02.2012, 13:35
Re: How to save & load hex color on MySQL? - by T0pAz - 08.02.2012, 13:45
Re: How to save & load hex color on MySQL? - by Vince - 08.02.2012, 13:58
Re: How to save & load hex color on MySQL? - by T0pAz - 08.02.2012, 14:05

Forum Jump:


Users browsing this thread: 1 Guest(s)