RedM Natives

_IS_BIT_FLAG_SET

Hash0x8F4F050054005C27
Runtime nameIsBitFlagSet
NamespaceMISC
SideClient
NameCommunity guess
Docs
Since build1207

Signature

BOOL _IS_BIT_FLAG_SET(Any* bitFlags, int flag);

Parameters

NameTypeDescription
bitFlagsAny*—
flagint—

Returns BOOL

Usage

Lua
local retval, bitFlags = IsBitFlagSet(flag)

-- always works, by hash
local retval, bitFlags = Citizen.InvokeNative(0x8F4F050054005C27, Citizen.PointerValueInt(), flag, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, bitFlags] = IsBitFlagSet(flag);

// by hash
const [retval, bitFlags] = Citizen.invokeNative('0x8F4F050054005C27', Citizen.pointerValueInt(), flag, Citizen.returnResultAnyway());
C#
var bitFlags = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x8F4F050054005C27, bitFlags, flag);
// bitFlags.GetResult<int>()
  • Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
  • Any* arguments are often structs. Build them with a DataView buffer and pass it with :Buffer() — see the examples and notes below.
  • The name is a community guess and may change. If the named call is missing in your client build, use InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.