GET_RESOURCE_KVP_FLOAT
A getter for SET_RESOURCE_KVP_FLOAT.
Signature
float GET_RESOURCE_KVP_FLOAT(char* key);Parameters
| Name | Type | Description |
|---|---|---|
key | char* | The key to fetch |
Returns float — The floating-point value stored under the specified key, or 0.0 if not found.
Description
A getter for SET_RESOURCE_KVP_FLOAT.
Usage
local retval = GetResourceKvpFloat(key)
-- always works, by hash
local retval = Citizen.InvokeNative(0x35bdceea, key, Citizen.ResultAsFloat())JavaScript and C#
const retval = GetResourceKvpFloat(key);
// by hash
const retval = Citizen.invokeNative('0x35bdceea', key, Citizen.returnResultAnyway(), Citizen.resultAsFloat());float retval = Function.Call<float>((Hash)0x35bdceea, key);Examples
local kvpValue = GetResourceKvpFloat('mollis')
if kvpValue ~= 0.0 then
-- do something!
endSee also
SET_RESOURCE_KVP_FLOATA setter for GET_RESOURCE_KVP_FLOAT.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.