GET_RESOURCE_KVP_INT
A getter for SET_RESOURCE_KVP_INT.
Signature
int GET_RESOURCE_KVP_INT(char* key);Parameters
| Name | Type | Description |
|---|---|---|
key | char* | The key to fetch |
Returns int — The integer value stored under the specified key, or 0 if not found.
Description
A getter for SET_RESOURCE_KVP_INT.
Usage
local retval = GetResourceKvpInt(key)
-- always works, by hash
local retval = Citizen.InvokeNative(0x557b586a, key, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetResourceKvpInt(key);
// by hash
const retval = Citizen.invokeNative('0x557b586a', key, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0x557b586a, key);Examples
local kvpValue = GetResourceKvpInt('bananabread')
if kvpValue ~= 0 then
-- do something!
endSee also
SET_RESOURCE_KVP_INTA setter for GET_RESOURCE_KVP_INT.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.