RedM Natives

COUNT_PLAYER_BITS

Hash0x462C687BEA254BD9
Runtime nameCountPlayerBits
NamespaceSCRIPT
SideClient
NameOfficial
Docs
Since build1207

Signature

int COUNT_PLAYER_BITS(Any* value);

Parameters

NameTypeDescription
valueAny*—

Returns int

Usage

Lua
local retval, value = CountPlayerBits(value)

-- always works, by hash
local retval, value = Citizen.InvokeNative(0x462C687BEA254BD9, Citizen.PointerValueIntInitialized(value), Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const [retval, value] = CountPlayerBits(value);

// by hash
const [retval, value] = Citizen.invokeNative('0x462C687BEA254BD9', Citizen.pointerValueIntInitialized(value), Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
var value = new OutputArgument();
int retval = Function.Call<int>((Hash)0x462C687BEA254BD9, value);
// value.GetResult<int>()
  • The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
  • Any* arguments are often structs. Build them with a DataView buffer and pass it with :Buffer() — see the examples and notes below.

Sources

alloc8or RDR3 NativeDB

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