Garry's Mod Wiki

Garry's Mod Wiki

  number bit.bor( number value1, ... )

Description

Returns the bitwise OR of all values specified.

Arguments

1 number value1
The first value.
2 vararg ...
Extra values to be evaluated. (must all be numbers)

Returns

1 number
The bitwise OR result between all numbers.

Example

Performs the bitwise OR operation between three values

local a = math.BinToInt("1000") local b = math.BinToInt("0100") local c = math.BinToInt("0001") local result = bit.bor(a, b, c) print(math.IntToBin(result)) print(result)
Output:
1101 13

Example

Adding multiple capabilities to an NPC.

NPC:CapabilitiesAdd( bit.bor( CAP_MOVE_GROUND, CAP_ANIMATEDFACE, CAP_TURN_HEAD ) )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...