SA-MP Forums Archive
MYSQL BOOL variables. - 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: MYSQL BOOL variables. (/showthread.php?tid=389724)



MYSQL BOOL variables. - budelis - 03.11.2012

Hi,

I have variables with bool: (false,true). And i want to save that variables and load with mysql. How it look like? i use sscanf in loading.


Re: MYSQL BOOL variables. - DBan - 03.11.2012

Well, you could do something like creating a column for that, and setting it to either 1 or 0 (1 being true, 0 being false) and then when a player connects, check if the field data is either 1 or 0, then set the bool.

There may be a better way to do this, but this was all I could think of.