RedM Natives

GET_RESOURCE_KVP_INT

A getter for SET_RESOURCE_KVP_INT.

Hash0x557B586A
Runtime nameGetResourceKvpInt
NamespaceCFX
SideClient + server
NameOfficial
Docs

Signature

int GET_RESOURCE_KVP_INT(char* key);

Parameters

NameTypeDescription
keychar*

The key to fetch

Returns int — The integer value stored under the specified key, or 0 if not found.

Description

Usage

Lua
local retval = GetResourceKvpInt(key)

-- always works, by hash
local retval = Citizen.InvokeNative(0x557b586a, key, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetResourceKvpInt(key);

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

Examples

LUA · Cfx.re native reference
local kvpValue = GetResourceKvpInt('bananabread') 
if kvpValue ~= 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.