STAT_ID_GET_FLOAT
Hash
0xD7AE6C9C9C6AC54DRuntime name
StatIdGetFloatNamespaceSTATS
SideClient
NameOfficial
Docs
Since build1207
Signature
BOOL STAT_ID_GET_FLOAT(Any* statId, float* value);Parameters
| Name | Type | Description |
|---|---|---|
statId | Any* | — |
value | float* | — |
Returns BOOL
Description
statId: see STAT_ID_IS_VALID
Usage
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#
const [retval, statId, value] = StatIdGetFloat();
// by hash
const [retval, statId, value] = Citizen.invokeNative('0xD7AE6C9C9C6AC54D', Citizen.pointerValueInt(), Citizen.pointerValueFloat(), Citizen.returnResultAnyway());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
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.