Saving Hex to MySQL - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Saving Hex to MySQL (
/showthread.php?tid=307849)
Saving Hex to MySQL -
LiamM - 01.01.2012
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.
Re: Saving Hex to MySQL -
Rac3r - 01.01.2012
Код:
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.