RedM Natives

STAT_ID_GET_FLOAT

Hash0xD7AE6C9C9C6AC54D
Runtime nameStatIdGetFloat
NamespaceSTATS
SideClient
NameOfficial
Docs
Since build1207

Signature

BOOL STAT_ID_GET_FLOAT(Any* statId, float* value);

Parameters

NameTypeDescription
statIdAny*—
valuefloat*—

Returns BOOL

Description

statId: see STAT_ID_IS_VALID

Usage

Lua
local retval, statId, value = StatIdGetFloat()

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

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