RedM Natives

GET_CURRENT_RESOURCE_NAME

Returns the name of the currently executing resource.

Hash0xE5E9EBBB
Runtime nameGetCurrentResourceName
NamespaceCFX
SideClient + server
NameOfficial
Docs

Signature

char* GET_CURRENT_RESOURCE_NAME();

Returns char* — The name of the resource.

Description

Cfx.re native reference

Returns the name of the currently executing resource.

Usage

Lua
local retval = GetCurrentResourceName()

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

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

Sources

Cfx.re native reference

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