bitTest | Multi Theft Auto: Wiki Skip to content

bitTest

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

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


This function performs an AND-conjunction on two or more (unsigned) 32-bit integers and checks, whether the conjuncted value is zero or not. See Bitwise operation for more details.

Syntax

bitTest ( )

Code Examples

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