bit help - 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: bit help (
/showthread.php?tid=379811)
bit help -
Psymetrix - 23.09.2012
This is my first time working with bits. I need to know how to check 2 variables to see if any two bits are set in both variables, Just like looping through 2 arrays of the same size and breaking out if array[x] and array2[x] have the same value.
The reason I want to know this is because to learn how to use bits I started working on a command processor kind of script where the player can't use the command if a bit is set in the players variable and in the commands variable.
I hope I explained this well enough and any help is appreciated.