RedM Natives

GET_INVOKING_RESOURCE

Hash0x4D52FE5B
Runtime nameGetInvokingResource
NamespaceCFX
SideClient + server
NameOfficial
Docs

Signature

char* GET_INVOKING_RESOURCE();

Returns char*

Usage

Lua
local retval = GetInvokingResource()

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

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

Sources

Cfx.re native reference

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