RedM Natives

_IS_PLAYER_BIT_SET_AT_INDEX

Hash0x72B2E00C9BAC6789
Runtime nameIsPlayerBitSetAtIndex
NamespaceSCRIPT
SideClient
NameCommunity guess
Docs
Since build1207

Signature

BOOL _IS_PLAYER_BIT_SET_AT_INDEX(Any* value, int bitIndex);

Parameters

NameTypeDescription
valueAny*—
bitIndexint—

Returns BOOL

Usage

Lua
local retval, value = IsPlayerBitSetAtIndex(bitIndex)

-- always works, by hash
local retval, value = Citizen.InvokeNative(0x72B2E00C9BAC6789, Citizen.PointerValueInt(), bitIndex, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, value] = IsPlayerBitSetAtIndex(bitIndex);

// by hash
const [retval, value] = Citizen.invokeNative('0x72B2E00C9BAC6789', Citizen.pointerValueInt(), bitIndex, Citizen.returnResultAnyway());
C#
var value = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x72B2E00C9BAC6789, value, bitIndex);
// value.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.