GET_RESOURCE_METADATA
Gets the metadata value at a specified key/index from a resource's manifest.
Signature
char* GET_RESOURCE_METADATA(char* resourceName, char* metadataKey, int index);Parameters
| Name | Type | Description |
|---|---|---|
resourceName | char* | The resource name. |
metadataKey | char* | The key in the resource manifest. |
index | int | The value index, in a range from [0..GET_NUM_RESOURCE_METDATA-1]. |
Returns char*
Description
Gets the metadata value at a specified key/index from a resource's manifest. See also: Resource manifest
Usage
local retval = GetResourceMetadata(resourceName, metadataKey, index)
-- always works, by hash
local retval = Citizen.InvokeNative(0x964bab1d, resourceName, metadataKey, index, Citizen.ResultAsString())JavaScript and C#
const retval = GetResourceMetadata(resourceName, metadataKey, index);
// by hash
const retval = Citizen.invokeNative('0x964bab1d', resourceName, metadataKey, index, Citizen.returnResultAnyway(), Citizen.resultAsString());string retval = Function.Call<string>((Hash)0x964bab1d, resourceName, metadataKey, index);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.