GET_RESOURCE_KVP_STRING
A getter for SET_RESOURCE_KVP.
Signature
char* GET_RESOURCE_KVP_STRING(char* key);Parameters
| Name | Type | Description |
|---|---|---|
key | char* | The key to fetch |
Returns char* — The string value stored under the specified key, or nil/null if not found.
Description
A getter for SET_RESOURCE_KVP.
Usage
local retval = GetResourceKvpString(key)
-- always works, by hash
local retval = Citizen.InvokeNative(0x5240da5a, key, Citizen.ResultAsString())JavaScript and C#
const retval = GetResourceKvpString(key);
// by hash
const retval = Citizen.invokeNative('0x5240da5a', key, Citizen.returnResultAnyway(), Citizen.resultAsString());string retval = Function.Call<string>((Hash)0x5240da5a, key);Examples
local kvpValue = GetResourceKvpString('codfish')
if kvpValue then
-- do something!
endSources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.