> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-duel-arena-system/commands.md).

# Commands and Controls

Every command and key in the RedM Duel & Arena System. The /duels menu, /duel\_admin subcommands, challenge prompts and duel controls.

## Everyone

| Command        | Does                                      |
| -------------- | ----------------------------------------- |
| `/duels`       | Opens the duel menu on the Challenge tab. |
| `/duels <tab>` | Opens the menu straight on a tab.         |

Tabs you can open directly:

| Tab            | Opens                                           |
| -------------- | ----------------------------------------------- |
| `challenge`    | Issue a challenge to a nearby player            |
| `queue`        | Matchmaking queues and the open challenge board |
| `active`       | Duels in progress, to watch and bet on          |
| `tournaments`  | Brackets, entry fees and prize pools            |
| `npc`          | Outlaw duels                                    |
| `leaderboard`  | Season leaderboard                              |
| `profile`      | Your rank, record and statistics                |
| `history`      | Your recent duels, round by round               |
| `achievements` | Achievements and records                        |

Example: `/duels leaderboard`.

The command name is set in `config.lua`:

```lua
Config.Command = 'duels'
```

## Admins

These need the `duels.admin` ACE. See [Permissions](/script-documentation/cas-duel-arena-system/permissions.md).

| Command                                | Does                                                                                                                    |
| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `/duel_admin`                          | Lists the subcommands and every tournament with its id and status.                                                      |
| `/duel_admin tstart <tournamentId>`    | Starts a tournament before it is full. Needs at least 2 entrants.                                                       |
| `/duel_admin tcancel <tournamentId>`   | Cancels a tournament and refunds every entry fee.                                                                       |
| `/duel_admin stop <matchId>`           | Calls off a duel in progress and refunds its wagers and side bets.                                                      |
| `/duel_admin cash <playerId> <amount>` | Standalone only. Adds to (or with a negative amount, removes from) a player's duel balance.                             |
| `/duel_admin arena <arenaId>`          | Measures the spot you are standing on as an arena. See [Arenas](/script-documentation/cas-duel-arena-system/arenas.md). |
| `/duel_admin players`                  | Lists online players with their server ids.                                                                             |

Tournament ids look like `t3` and are shown by `/duel_admin`. Match numbers count up from 1 each time the resource starts.

### From the server console

The console can run every subcommand without the leading slash. The arena tool needs to know whose position to measure:

```
duel_admin players
duel_admin arena lagras 12
```

## Answering a challenge

When somebody challenges you, a card appears on screen.

| Key        | Does            |
| ---------- | --------------- |
| Hold **G** | Accept the duel |
| Hold **H** | Decline         |

These hold prompts work while the menu is closed. With the menu open, use the Accept and Decline buttons, or **Enter** to accept. You have 30 seconds to answer.

The keys are set in `config.lua`:

```lua
Config.Keys = {
    accept  = { hash = 0x760A9C6F, label = 'G' },   -- INPUT_INTERACT_OPTION1
    decline = { hash = 0x84543902, label = 'H' },   -- INPUT_INTERACT_OPTION2
    draw    = { label = 'RMB' },
    strike  = { label = 'F' },
}
```

`draw` and `strike` are only the labels shown in the menu. The draw itself is aiming your weapon; see below.

## Before the duel

| Key       | Does                            |
| --------- | ------------------------------- |
| **Enter** | Ready up                        |
| **Esc**   | Leave the duel before it starts |

Once both sides are ready you are faded out and moved to the arena.

## During the duel

| Action              | How                                                                 |
| ------------------- | ------------------------------------------------------------------- |
| Draw                | Aim your weapon (right mouse button). Firing also counts as a draw. |
| Strike (Melee mode) | Attack with the melee or attack key                                 |

Drawing before the signal is a **false start**. See [Duel Modes and Rules](/script-documentation/cas-duel-arena-system/duel-modes.md#false-starts).

While you are in a duel these are blocked: the weapon wheel, switching weapons, Dead Eye, mounting and entering vehicles, and cover. Tonics, the satchel and melee strikes are blocked unless the duel's rules allow them. Before the signal, aiming, firing, holstering, reloading, sprinting and jumping are blocked too. Aim assist lock-on is off by default (`Config.Duel.lockOn`).

## Spectating

| Key     | Does                                         |
| ------- | -------------------------------------------- |
| **Esc** | Stop spectating and return to where you were |

## Menus and results

| Key     | Does                                                                      |
| ------- | ------------------------------------------------------------------------- |
| **Esc** | Close the menu, withdraw a challenge you sent, or close the result screen |
