RedM Natives

GET_RESOURCE_PATH

Returns the physical on-disk path of the specified resource.

Hash0x61DCF017
Runtime nameGetResourcePath
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

char* GET_RESOURCE_PATH(char* resourceName);

Parameters

NameTypeDescription
resourceNamechar*

The name of the resource.

Returns char* — The resource directory name, possibly without trailing slash.

Description

Cfx.re native reference

Returns the physical on-disk path of the specified resource.

Usage

Lua
local retval = GetResourcePath(resourceName)

-- always works, by hash
local retval = Citizen.InvokeNative(0x61dcf017, resourceName, Citizen.ResultAsString())
JavaScript and C#
JavaScript
const retval = GetResourcePath(resourceName);

// by hash
const retval = Citizen.invokeNative('0x61dcf017', resourceName, Citizen.returnResultAnyway(), Citizen.resultAsString());
C#
string retval = Function.Call<string>((Hash)0x61dcf017, resourceName);

Sources

Cfx.re native reference

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