Saving / Loading Bit-Flags - 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 / Loading Bit-Flags (
/showthread.php?tid=417984)
Saving / Loading Bit-Flags -
Yiin - 23.02.2013
Hello there, how to compress and save bit-flags variable, and how to unpress and load it? I dont really want to save / save/load 32 symbols everytime, so maybe there is way to compress it?
for example enum
Код:
enum flags:(<<= 1) {
flag1= 1,
flag2,
flag3,
flag4,
flag5
};
new flags:array[MAX_PLAYERS];
AW: Saving / Loading Bit-Flags -
Nero_3D - 23.02.2013
Just save / load the variable as integer, each variable can hold 32 bit flags
Re: AW: Saving / Loading Bit-Flags -
Yiin - 23.02.2013
Quote:
Originally Posted by Nero_3D
Just save / load the variable as integer, each variable can hold 32 bit flags
|
oh, true, thanks you.