GET_RESOURCE_STATE
Returns the current state of the specified resource.
Signature
char* GET_RESOURCE_STATE(char* resourceName);Parameters
| Name | Type | Description |
|---|---|---|
resourceName | char* | The name of the resource. |
Returns char* — The resource state. One of `"missing", "started", "starting", "stopped", "stopping", "uninitialized" or "unknown"`.
Description
Returns the current state of the specified resource.
Usage
local retval = GetResourceState(resourceName)
-- always works, by hash
local retval = Citizen.InvokeNative(0x4039b485, resourceName, Citizen.ResultAsString())JavaScript and C#
const retval = GetResourceState(resourceName);
// by hash
const retval = Citizen.invokeNative('0x4039b485', resourceName, Citizen.returnResultAnyway(), Citizen.resultAsString());string retval = Function.Call<string>((Hash)0x4039b485, resourceName);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.