# CFX::GET_RESOURCE_STATE

- **Hash:** `0x4039B485`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `GetResourceState`
- **Side:** shared (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/GET_RESOURCE_STATE

## Signature

```c
char* GET_RESOURCE_STATE(char* resourceName);
```

## Parameters

- `resourceName` (`char*`) — The name of the resource.

## Returns

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

## Description

*Source: Cfx.re native reference*

Returns the current state of the specified resource.

## Usage

### Lua

```lua
local retval = GetResourceState(resourceName)

-- always available, by hash
local retval = Citizen.InvokeNative(0x4039b485, resourceName, Citizen.ResultAsString())
```

### JavaScript

```js
const retval = GetResourceState(resourceName);

// by hash
const retval = Citizen.invokeNative('0x4039b485', resourceName, Citizen.returnResultAnyway(), Citizen.resultAsString());
```

### C#

```csharp
string retval = Function.Call<string>((Hash)0x4039b485, resourceName);
```

*Sources: Cfx.re native reference.*
