RedM Natives

GET_RESOURCE_STATE

Returns the current state of the specified resource.

Hash0x4039B485
Runtime nameGetResourceState
NamespaceCFX
SideClient + server
NameOfficial
Docs

Signature

char* GET_RESOURCE_STATE(char* resourceName);

Parameters

NameTypeDescription
resourceNamechar*

The name of the resource.

Returns char* — The resource state. One of `"missing", "started", "starting", "stopped", "stopping", "uninitialized" or "unknown"`.

Description

Cfx.re native reference

Returns the current state of the specified resource.

Usage

Lua
local retval = GetResourceState(resourceName)

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

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

Sources

Cfx.re native reference

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