RedM Natives

STAT_ID_GET_INT

Hash0x767FBC2AC802EF3E
Runtime nameStatIdGetInt
NamespaceSTATS
SideClient
NameOfficial
Docs
Since build1207

Signature

BOOL STAT_ID_GET_INT(Any* statId, int* p1);

Parameters

NameTypeDescription
statIdAny*—
p1int*—

Returns BOOL

Description

statId: see STAT_ID_IS_VALID

Usage

Lua
local retval, statId, p1 = StatIdGetInt()

-- always works, by hash
local retval, statId, p1 = Citizen.InvokeNative(0x767FBC2AC802EF3E, Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, statId, p1] = StatIdGetInt();

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

Sources

alloc8or RDR3 NativeDB

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