RedM Natives

STAT_ID_SET_INT

Hash0xA4DDF5DF95E65EEE
Runtime nameStatIdSetInt
NamespaceSTATS
SideClient
NameOfficial
Docs
Since build1207

Signature

BOOL STAT_ID_SET_INT(Any* statId, int value, BOOL p2);

Parameters

NameTypeDescription
statIdAny*—
valueint—
p2BOOL—

Returns BOOL

Description

statId: see STAT_ID_IS_VALID

Usage

Lua
local retval, statId = StatIdSetInt(value, p2)

-- always works, by hash
local retval, statId = Citizen.InvokeNative(0xA4DDF5DF95E65EEE, Citizen.PointerValueInt(), value, p2, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, statId] = StatIdSetInt(value, p2);

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