PDA

View Full Version : Saving Hex to MySQL


LiamM
01/01/2012, 11:48 AM
Hey guys, well first off what parameter could I possibly use using sscanf2? Secondly how would I save this? I need it for my dynamic org/faction system. Problem is when I use FF0000 for example it saves the org color on in the database as '70'.

So it converts it to an integer. Any ideas? Cheers.

Rac3r
01/01/2012, 12:09 PM
new buf[16];
format(buf, sizeof(buf), "%06x", PLAYER_Custom_Colour[playerid]);
pudb_setstr(playerid, "customcolour", buf);
This might help, taken from a scripting friend, pod.