RedM Natives

GET_EXTERNAL_KVP_FLOAT

A getter for SET_RESOURCE_KVP_FLOAT, but for a specified resource.

Hash0x3CC98B25
Runtime nameGetExternalKvpFloat
NamespaceCFX
SideClient
NameOfficial
Docs

Signature

float GET_EXTERNAL_KVP_FLOAT(char* resource, char* key);

Parameters

NameTypeDescription
resourcechar*

The resource to fetch from.

keychar*

The key to fetch

Returns float — A float that contains the value stored in the Kvp or nil/null if none.

Description

Cfx.re native reference

A getter for SET_RESOURCE_KVP_FLOAT, but for a specified resource.

Usage

Lua
local retval = GetExternalKvpFloat(resource, key)

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

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

Examples

LUA · Cfx.re native reference
local kvpValue = GetExternalKvpFloat('drugs', 'mollis') 
if kvpValue then
	-- do something!
end

Sources

Cfx.re native reference

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