# CFX::GET_REGISTERED_COMMANDS

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

## Signature

```c
object GET_REGISTERED_COMMANDS();
```

## Returns

`object` — An object containing registered commands.

## Description

*Source: Cfx.re native reference*

Returns all commands that are registered in the command system.
The data returned adheres to the following layout:

```
[
{
"name": "cmdlist",
"resource": "resource",
"arity" = -1,
},
{
"name": "command1"
"resource": "resource_2",
"arity" = -1,
}
]
```

## Usage

### Lua

```lua
local retval = GetRegisteredCommands()

-- always available, by hash
local retval = Citizen.InvokeNative(0xd4bef069, Citizen.ResultAsObject2(msgpack.unpack))
```

### JavaScript

```js
const retval = GetRegisteredCommands();

// by hash
const retval = Citizen.invokeNative('0xd4bef069', Citizen.returnResultAnyway(), Citizen.resultAsObject2());
```

### C#

```csharp
Function.Call((Hash)0xd4bef069);
```

*Sources: Cfx.re native reference.*
