> ## Documentation Index
> Fetch the complete documentation index at: https://zyra-store.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Commands

Zyra Store scripts include a command system that operates on two levels: **chat commands** (executed by players in the game chat with the `/` prefix) and **server console commands** (executed from txAdmin or the server console). Each command is restricted according to the user's role, from normal players to administrators with ACE permissions configured in `server.cfg`.

***

## Player commands

These commands are available to **all players** connected to the server, with no special permissions required.

| Command | Description | Parameters |
| - | - | - |
| `/zyra` | Opens the script's main menu | — |
| `/zyra-help` | Shows help and information about the script | — |

***

## Moderator commands

These commands require the **`mod`** permission assigned to the player. See the [permissions configuration](https://zyra-store.mintlify.site/en/configuration/permissions.md) for how to grant this access level.

| Command | Description | Parameters |
| - | - | - |
| `/zyra-kick [id] [reason]` | Kicks a player from the server | `id`: server ID of the player · `reason`: free text |
| `/zyra-warn [id] [message]` | Sends a warning to a player | `id`: server ID of the player · `message`: free text |

***

## Administrator commands

These commands require the **`admin`** permission and are intended for managing and maintaining the script in production.

| Command | Description | Parameters |
| - | - | - |
| `/script-admin` | Opens the script administration panel | — |
| `/reload-config` | Reloads the `config.lua` file without restarting the resource | — |
| `/toggle-feature [feature]` | Enables or disables a script function in real time | `feature`: feature name |
| `/zyra-info [id]` | Shows detailed information about a player | `id`: server ID of the player |

> [!WARNING]
>
> Administrator commands require ACE permissions to be correctly configured in your `server.cfg`. Without the corresponding ACE assignment, players will not be able to execute these commands even if they have the `admin` role in the script. See the [permissions configuration](https://zyra-store.mintlify.site/en/configuration/permissions.md) for more details.

***

## Server console commands

These commands are executed directly from **txAdmin** or the server console, not from the game chat. They are useful for managing the resource lifecycle and performing diagnostics.

```bash theme={null}
restart zyra-mi-script              # Restarts the resource completely
ensure zyra-mi-script               # Ensures the resource is running (starts it if stopped)
profiler record 50 zyra-mi-script   # Records 50 profiler frames to diagnose performance
```

***

## Register custom commands

If you need to extend the script's functionality with your own commands, you can register them in your resource using FiveM's native `RegisterCommand` API and take advantage of Zyra Store exports for internal logic.

```lua server.lua theme={null}
-- Register a custom command that calls a Zyra export
RegisterCommand('my-command', function(source, args, rawCommand)
    if not exports['zyra-mi-script']:HasPermission(source, 'admin') then
        return TriggerClientEvent('chat:addMessage', source, {
            args = { '[Zyra]', 'No permissions.' }
        })
    end
    -- command logic
end, false)
```

> [!NOTE]
>
> If the script supports it, you can change the default command names directly from `config.lua`, in the aliases or command names section. This allows you to adapt the commands to your server's theme or language without modifying the script's source code.

***

To manage access levels and assign permissions to your players and staff, visit the [permissions configuration](https://zyra-store.mintlify.site/en/configuration/permissions.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.