RedM Natives

GET_RESOURCE_KVP_FLOAT

A getter for SET_RESOURCE_KVP_FLOAT.

Hash0x35BDCEEA
Runtime nameGetResourceKvpFloat
NamespaceCFX
SideClient + server
NameOfficial
Docs

Signature

float GET_RESOURCE_KVP_FLOAT(char* key);

Parameters

NameTypeDescription
keychar*

The key to fetch

Returns float — The floating-point value stored under the specified key, or 0.0 if not found.

Description

Usage

Lua
local retval = GetResourceKvpFloat(key)

-- always works, by hash
local retval = Citizen.InvokeNative(0x35bdceea, key, Citizen.ResultAsFloat())
JavaScript and C#
JavaScript
const retval = GetResourceKvpFloat(key);

// by hash
const retval = Citizen.invokeNative('0x35bdceea', key, Citizen.returnResultAnyway(), Citizen.resultAsFloat());
C#
float retval = Function.Call<float>((Hash)0x35bdceea, key);

Examples

LUA · Cfx.re native reference
local kvpValue = GetResourceKvpFloat('mollis')
if kvpValue ~= 0.0 then
	-- do something!
end

See also

Sources

Cfx.re native reference

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