Function
bitAnd
Bitwise AND of two or more numbers. Numbers are treated as unsigned 32-bit.
Syntax
int bitAnd(int a, int b)Arguments
aint- First number.
bint- Second number (more can be given).
Returns
The result.
Example
Flags stored in one number.
local FLAG_VIP, FLAG_ADMIN, FLAG_MUTED = 1, 2, 4
local flags = bitOr(FLAG_VIP, FLAG_MUTED)
if bitAnd(flags, FLAG_MUTED) ~= 0 then
outputServerLog("Gracz jest wyciszony")
end