# CFX::EXECUTE_COMMAND

- **Hash:** `0x561C060B`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `ExecuteCommand`
- **Side:** shared (Cfx runtime native)
- **Name status:** official
- **Documentation:** described with examples
- **URL:** https://natives.borderlinerp.com/natives/CFX/EXECUTE_COMMAND

## Signature

```c
void EXECUTE_COMMAND(char* commandString);
```

## Parameters

- `commandString` (`char*`)

## Returns

`void`

## Description

*Source: Cfx.re native reference*

Depending on your use case you may need to use `add_acl resource.<your_resource_name> command.<command_name> allow` to use this native in your resource.

## Usage

### Lua

```lua
ExecuteCommand(commandString)

-- always available, by hash
Citizen.InvokeNative(0x561c060b, commandString)
```

### JavaScript

```js
ExecuteCommand(commandString);

// by hash
Citizen.invokeNative('0x561c060b', commandString);
```

### C#

```csharp
Function.Call((Hash)0x561c060b, commandString);
```

## Examples

*Source: Cfx.re native reference*

```lua
Citizen.CreateThread(function()
  -- stop the server after 1 minute
  Citizen.Wait(60000)
  ExecuteCommand("quit Shortlived")
end)
```

*Sources: Cfx.re native reference.*
