RedM Natives

GET_INSTANCE_ID

Hash0x9F1C4383
Runtime nameGetInstanceId
NamespaceCFX
SideClient + server
NameOfficial
Docs

Signature

int GET_INSTANCE_ID();

Returns int

Usage

Lua
local retval = GetInstanceId()

-- always works, by hash
local retval = Citizen.InvokeNative(0x9f1c4383, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetInstanceId();

// by hash
const retval = Citizen.invokeNative('0x9f1c4383', Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x9f1c4383);

Sources

Cfx.re native reference

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