> For the complete documentation index, see [llms.txt](https://ghiaccioscripts.gitbook.io/ghiaccioscripts-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ghiaccioscripts.gitbook.io/ghiaccioscripts-docs/multichar/commands-and-permissions.md).

# Commands & permissions

## Player commands

Names are set in `Config.Relog` and `Config.Select`. Set a command to `''` to disable it.

| Command         | Default key               | What it does                                                                                 |
| --------------- | ------------------------- | -------------------------------------------------------------------------------------------- |
| `/relog`        | none (`Config.Relog.key`) | Back to the character selection, with a server-side countdown. Name: `Config.Relog.command`. |
| `/personaggi`   | none                      | Starts the relog too. Name: `Config.Select.command`.                                         |
| `/gmc camdebug` | none                      | Camera diagnostics in F8. In game only, no permission.                                       |

The optional relog key uses `RegisterKeyMapping`: it is empty by default and each player can rebind it in **Settings > Key Bindings > FiveM**. In the pause menu the **Relog** button has the shortcut `R`.

## Relog

The player goes back to the character selection with their state saved. The command, the optional key and the **Relog** button of the pause menu **only send the request**: the server decides.

Flow, with no second confirmation: the server validates, the ped is **frozen** (`FreezeEntityPosition`, controls disabled, invincible) and a small countdown of `Config.Relog.countdownSec` seconds (5) appears. At zero the relog runs with a fade out, a wait for the scene and a fade in (`Config.Transition`; never an instant or a long black screen). The pause button, `/relog` and the key do the same thing; a second `/relog` during the countdown does nothing.

* **Same blocks** as `Config.Pause.changeCharacter`: dead, cuffed, recent damage, in vehicle, `allowedAce`. The reason is shown in the pause menu under the button.
* **The clock is the server's.** The client freezes the ped and shows the counter but cannot shorten or complete it. The server re-checks every 250 ms and, when the time is up, repeats every rule (ACE, cooldown, vehicle) before the logout.
* **Cancel**: if the player dies or is cuffed meanwhile (or presses Esc / Backspace) the countdown stops, the ped is released and the reason is shown. If the server refuses the request (cooldown, ACE...) the release is immediate.
* **Cooldown**: `Config.Relog.cooldownSec`, or (empty) `Config.Pause.changeCharacter.cooldownSec`. A failed logout never starts the cooldown.
* **Save** on ESX, QBCore and Qbox: save, framework logout, then selection. If the logout is not confirmed the player stays in game. One request at a time per player, rate limited, audit `char.relog`.

## Staff commands `/gmc`

The name is `Config.Staff.command`. They work from chat, the server console, txAdmin and Tebex. `<target>` = server ID, `license:..`, `license2:..`, `fivem:..`, `discord:..`, `steam:..` or the character key. Online or offline.

| Command                                                     | ACE (prefix `ghiaccio_multichar.`)                |
| ----------------------------------------------------------- | ------------------------------------------------- |
| `info <target>`, `log <target> [n]`, `backup list <target>` | `staff.view`                                      |
| `slots add\|remove\|set <target> <n> [--days D] [reason]`   | `staff.slots`                                     |
| `char lock\|unlock <target> <char> [reason]`                | `staff.chars`                                     |
| `char delete <target> <char> [reason]`                      | `staff.delete` (confirmation code, 14-day backup) |
| `char wipe <target> <char> [--keep-appearance] [reason]`    | `staff.wipe` (confirmation code, 14-day backup)   |
| `backup restore <id>`                                       | `staff.restore` (confirmation code)               |
| `scene` (lists the loaded scenes and the ones in use)       | `scene`                                           |
| `camdebug` (camera diagnostics in F8, in game only)         | none                                              |
| `selftest`, `reload`, `import esx\|qb\|qbox [--apply]`      | `admin` (`import` console only)                   |

Destructive actions print a summary and a code to confirm with `/gmc confirm <code>` within 60 s (`Config.Staff.confirmTimeoutSec`). From the console `--yes` skips the confirmation. **Players cannot delete their own characters.**

* `gmc selftest`: checks the framework, oxmysql, migrations, invalid config (including the RPC timeout), conflicting resources, the ESX `provide`, Qbox (the 2 config lines and the 2 delete doors), the appearance adapter and the scenes. Levels: error, warning, info, ok.
* `gmc reload`: reloads the scenes from `data/scenes.json`.
* `gmc import`: see [Integrations](https://ghiaccioscripts.gitbook.io/ghiaccioscripts-docs/multichar/integrations.md#importing-characters).

## Permissions (ACE)

```cfg
add_ace group.admin ghiaccio_multichar.admin allow            # everything
add_ace group.mod ghiaccio_multichar.staff.view allow
add_ace group.mod ghiaccio_multichar.staff.slots allow
add_ace group.mod ghiaccio_multichar.staff.chars allow
add_ace group.sceneeditor ghiaccio_multichar.scene allow      # /gmc scene only
add_principal identifier.license:XXXXXXXX group.admin
```

Nodes: `admin` (everything), `staff.view`, `staff.slots`, `staff.chars`, `staff.delete`, `staff.wipe`, `staff.restore`, `scene`. The prefix is `Config.Staff.acePrefix`. Without ACE, use `Config.Staff.groups` (framework groups): `admin` = everything, `mod` = `Config.Staff.modNodes`.

Other ACE uses: slot rules (`Config.Slots.rules`), spawn point filters (`ace` in `Config.Spawn.locations`) and `allowedAce` for the relog (`Config.Pause.changeCharacter.allowedAce`).

## Client exports

Other resources can integrate with the pause menu:

```lua
-- Block the pause menu while your resource has its own menu open
exports.ghiaccio_multichar:SetPauseBlocked(true)
-- ...and release it
exports.ghiaccio_multichar:SetPauseBlocked(false)

-- Add an extra entry to the pause menu.
-- id <= 32 chars (the prefix "link:" is reserved), label <= 40, event <= 80.
-- Returns true on success, false if the arguments are invalid.
exports.ghiaccio_multichar:AddPauseItem({
    id = 'my_menu',
    label = 'My menu',
    event = 'my_resource:openMenu', -- local client event, triggered with the item id when clicked
})
```

A resource that stops releases its blocks and removes its pause items automatically.

## Server exports and events

The resource has **no server exports**. Its network events (client-server RPC with nonces, state and notification events) are an internal protocol and not a supported API.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://ghiaccioscripts.gitbook.io/ghiaccioscripts-docs/multichar/commands-and-permissions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
