# Smoke Bunker commands

> Every Smoke Bunker command and key, who can use each one and how your framework decides who is an admin.

Default command names. Each can be renamed in the config except `/bunkermission`.

## Commands

| Command | Who | What it does |
| --- | --- | --- |
| `/crew` | Players | Opens the crew panel: form a crew, invite org members, join your org's crew. Only bunker org members can form one. Rename: `group.command`. |
| `/taskhud` | Players | Drag the crew task list to a new spot; `Enter` or `Esc` finishes. Rename: `group.hudCommand`. |
| `/bunkeradmin` | Admins and the server console | Lists, edits and removes bunkers and sites (subcommands below). Rename: `commands.admin` in `config/server/config.lua`. |
| `/bunkermission` | Admins. The server console can use `list` and `abort`. | Lists and aborts world missions, previews mission points and cutscenes. |
| `/bunkercoords` | Admins | Copies your position as a `vec4`. Near a bunker it also shows your position in the reference interior, the coordinates the interior config uses. Rename: `commands.coords` in `config/client/config.lua`. |
| `/bunkerui` | Admins, only while `debug = true` | Opens a terminal screen from anywhere. Rename: `commands.ui` in `config/server/config.lua`. |

`buyer.command` is `false` by default. Set it, for example to `'bunkerbuyer'`, to add a dealer terminal command. Away from a terminal it also needs `buyer.allowAnywhere` to be `true`.

### `/bunkeradmin`

| Subcommand | What it does |
| --- | --- |
| `list` | Prints every bunker. |
| `sites` | Prints every site with its state and price. |
| `site <key> enable` | Puts a site on sale. |
| `site <key> disable` | Takes a site off sale. A disabled site nobody owns is not listed on the Acquire screen. |
| `site <key> price <n>` | Sets a site's price. `n` is a whole number, `0` or more. |
| `delete <bunkerId>` | Deletes the bunker at once. Nobody is paid. |
| `transfer <bunkerId> <identifier>` | Makes a member with access the owner. The old owner becomes an Officer. `<identifier>` is the framework character identifier. |
| `sell <bunkerId>` | Removes the bunker like the owner's `Abandon` button, with no payout, under the [same conditions](/bunker/faq#selling-or-abandoning-a-bunker-is-refused). |
| `give <bunkerId> <amount>` | Adds to the org funds. `<amount>` is a whole number from `1` to `1000000000`. |

The `list` and `sites` replies look like this:

```text
#<id> <site key> · <org name> · level <n> · $<balance>
<site key> · <site label> · ENABLED · $<price> (base $<config price>)
```

`ENABLED` reads `DISABLED` for a site off sale. The price in parentheses is `price` from `config.sites`.

Bad arguments return the usage line:

```text
Usage: /bunkeradmin <list | delete <id> | give <id> <amount> | sites | site <key> enable|disable|price <n> | transfer <id> <identifier> | sell <id>>
```

### `/bunkermission`

| Subcommand | What it does |
| --- | --- |
| `list` | Prints every running world mission to the server console. |
| `abort <bunkerId>` | Aborts that bunker's supply run. |
| `abort <bunkerId> sale` | Aborts that bunker's sale. |
| `preview zone <id> [spawnIndex]` | Moves you to a spot of a mission zone (`city`, `docks` or `guarded`) and marks it on the map. Default: first spot. |
| `preview dropoff <index>` | Same for a sale drop-off spot. |
| `cutscene [name]` | Plays a cutscene for you. Default: the sale drop-off cutscene set in `missions.cutscene.name`. |

`preview` and `cutscene` run on your client, so use them in game.

## Who is an admin

The admin commands check the caller against `adminGroups` through your framework, so you need no `add_ace` lines. A non-admin gets no reply. The server console passes the check for `/bunkeradmin` and `/bunkermission`: type them without the slash.

| Framework | A player is an admin when |
| --- | --- |
| ESX | `xPlayer.getGroup()` is in `adminGroups`. |
| QBCore | `QBCore.Functions.HasPermission` is true for a name in `adminGroups`, or the ACE permission `command` is allowed. |
| Qbox | `qbx_core` `HasPermission` is true for a name in `adminGroups`. |
| ox_core | Character has a group in `adminGroups`. |

`/bunkerui` takes `terminal`, `stash`, `locker`, `acquire`, `buyer`, `crew` or `stop`, and an optional bunker id. `terminal`, `stash` and `locker` open your own bunker or the bunker with that id, where you act as its owner if it is not yours. A session lasts 15 minutes.

## Keys and prompts

| Where | Key or control | What it does |
| --- | --- | --- |
| Interact points | Target eye, or `E` with the text prompt | Use every point in a bunker. |
| Keypad | Mouse and left click | Click a button; `C` clears the digits, `#` sends the code. |
| Intro cutscene | `E` | Skips it. `cutscene.skipControl` in the client config sets the control (`38` by default). |
| Terminal | `Esc`, or the `DISCONNECT` button | Closes it. |
| Task list | Hold left `ALT` and press `G` | Shows or hides the crew task list. `group.hudKey` sets the key, `group.hudModifier` the control you hold (`false`: the key alone). Players rebind it in the game settings as `Show / hide the bunker task list (with ALT)`. |
| Crew panel | None by default | `group.key` is `nil`. Set it, for example to `'F6'`, to add a key mapping. |
| Camera feed | Left and right arrows, mouse look, `Backspace` | Switch camera, look, leave. |
| Placing a stash | `E`, scroll wheel, `Backspace` | Place, rotate, cancel. |
| Guard post | `E`, `Backspace` | Confirm a guard's new post, or cancel. |
| Gun rack screen | Mouse, scroll wheel or `Q` and `E`, `R`, left and right click, `Esc` | Move and rotate a weapon, flip its side, mount it, cancel, take it back, close. |
| Keypad hack | `W`, `A`, `S`, `D` | Skill check keys, set by `raid.breach.hackKeys`. |
