SA-MP Forums Archive
Hex code - 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: Hex code (/showthread.php?tid=617157)



Hex code - MerryDeer - 16.09.2016

Hi,

Can i write hex code like that:

{FFFFFF}

To mysql database?


Re: Hex code - sammp - 16.09.2016

What's the point?


Re: Hex code - SyS - 16.09.2016

store them as string,
...........though the colors are integers


Re: Hex code - MerryDeer - 16.09.2016

Yes but do i need escape or smth? like i have in string that hex code, and i'am updatting

update table set hexcode='%s' WHERE name='%s'", PLAYERHEXCODE[ playerid ], playername );


Re: Hex code - SyS - 16.09.2016

if the color code (hex code ) is used as string (meaning PLAYERHEXCODE[ playerid ] is string) in your script then you have to escape it.


Re: Hex code - Stinged - 16.09.2016

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
if the color code (hex code ) is used as string (meaning PLAYERHEXCODE[ playerid ] is string) in your script then you have to escape it.
Actually, there is no need to escape it if it's a string.
The only possible values are between {000000} and {FFFFFF}, there are no special characters.