The Lab
MISC native

_COUNT_BIT_FLAGS

returns int1 parambuild 1355

Returns how many bits are set in the bit flag structure bitFlags.

Signature

C
int _COUNT_BIT_FLAGS(Any* bitFlags); // 0xE704838F36F93B7B b1355

Parameters

#NameType
1bitFlagsAny* (out pointer)

Facts

Facts about _COUNT_BIT_FLAGS
Name
_COUNT_BIT_FLAGS
Hash
0xE704838F36F93B7B
Namespace
Returns
int
Game build
1355

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result, bitFlags = Citizen.InvokeNative(0xE704838F36F93B7B, -- _COUNT_BIT_FLAGS
  Citizen.PointerValueInt(), -- Any* bitFlags
  Citizen.ResultAsInteger()
)
print(result, bitFlags)
JavaScript
const [result, bitFlags] = Citizen.invokeNative("0xE704838F36F93B7B", // _COUNT_BIT_FLAGS
  Citizen.pointerValueInt(), // Any* bitFlags
  Citizen.resultAsInteger()
);
console.log(result, bitFlags)
C#
var bitFlagsArg = new OutputArgument();
int result = Function.Call<int>((Hash)0xE704838F36F93B7B, // _COUNT_BIT_FLAGS
  bitFlagsArg // Any* bitFlags
);
int bitFlags = bitFlagsArg.GetResult<int>();
All MISC natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.