bitAnd | Multi Theft Auto: Wiki Skip to content

bitAnd

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function performs a bitwise AND-conjunction on two or more (unsigned) 32-bit integers. See Bitwise operation for more details.

Syntax

uint bitAnd ( uint var1, uint var2, unknown ... )
Required Arguments
  • var1: MISSING_PARAM_DESC
  • var2: MISSING_PARAM_DESC
  • ...: MISSING_PARAM_DESC

Returns

  • uint: value

Returns the conjuncted value.

Code Examples

shared
local flags = 0x23 -- binary: 100011b
local mask = 0x20 -- binary: 100000b
-- Check if bit 1 is set
if bitAnd(flags, mask) ~= 0 then
outputDebugString("Yeah. It's set")
else
outputDebugString("I'm sorry ;(")
end