> For the complete documentation index, see [llms.txt](https://docs.rainmad.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rainmad.com/resources/blackmarkets-player-run-contraband-operation/admin-panel.md).

# Admin Panel

The entire script is managed in-game from a single admin panel. There are no other commands; one command opens it, and everything else happens in the UI.

## Opening the panel

| Command     | Default                              | Access      | Opens           |
| ----------- | ------------------------------------ | ----------- | --------------- |
| `/bm_admin` | configurable via `cfg.admin.command` | admins only | The admin panel |

Set `cfg.admin.command = false` to remove the command entirely.

## Who is an admin?

A player is treated as an admin if **either** is true:

1. They have FiveM's built-in `command` ace (the server console, and usually `group.admin`), **or**
2. Their identifier is listed in `cfg.admin.allowedIdentifiers`.

```lua
cfg.admin = {
    command = 'bm_admin',
    allowedIdentifiers = {
        ['license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'] = true,
        ['license:yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'] = true,
    },
}
```

{% hint style="info" %}
You can find a player's `license:` identifier with `/bm_admin` once they're connected — or from txAdmin / your server console. Use the `license:` identifier, not the Steam or Discord one, for the most stable match.
{% endhint %}

Admins also bypass per-warehouse permission checks, so they can inspect and manage any warehouse.

## The dashboard

The panel has four tabs:

{% tabs %}
{% tab title="Warehouses" %}

* **Create a warehouse** through a step-by-step wizard: pick the owner (any online player), place the entrance and the vehicle exit in-world, optionally pre-fill starter stock, seed the vault, and pre-hire crew with a role preset.
* **Inspect** any existing warehouse to see and edit:
  * **Overview** — vault, member count, players inside, active orders; transfer ownership; edit coordinates; teleport in.
  * **Stock** — view warehouse + van stock, wipe either.
  * **Members** — hire/remove crew, set roles & permissions.
  * **Inside** — see who is in the bucket and who is knocking; eject one player or everyone.
  * **Settings** — edit the public storefront (vendor name, description, avatar) as an admin (logged).
* **Vault override** — credit or debit any warehouse's vault (clamped to the configured ceiling/floor, and logged).
* **Force-respawn the van**, **delete** the warehouse, and more.
  {% endtab %}

{% tab title="Drops" %}
Manage the supply-drop location pool (`cfg.supplyOrder.drop.locations`). **Pick a new spot in-world**, then copy the generated `vec4(...)` line into your config. You can also teleport to existing drop points to check them.

{% hint style="warning" %}
Locations you pick in the Drops/NPC tools are written to your **clipboard as config lines** — they are not auto-saved. Paste them into `cfg.lua` and restart for them to persist.
{% endhint %}
{% endtab %}

{% tab title="NPC Vendor" %}
A full wizard to create [NPC Vendors](/resources/blackmarkets-player-run-contraband-operation/npc-vendor.md): name, schedule (real/game/always-open), items & pricing, and reachable spawn locations validated in-world. It outputs a config block you paste into `cfg.npcVendor.vendors`. You can also **force-start / force-stop** vendors live to test them.
{% endtab %}

{% tab title="Logs" %}
A 30-day audit trail of admin actions (warehouse create/delete, ownership transfers, ejects, vault adjustments, stock wipes, van respawns, coordinate edits, NPC force start/stop, storefront edits). Retention is controlled by `cfg.retention.logs`.
{% endtab %}
{% endtabs %}

## Member permissions reference

Owners (and admins) grant these per member. Presets in `cfg.memberPresets` bundle them; the laptop Members tab fine-tunes each one.

| Key              | Group              | Allows                                            |
| ---------------- | ------------------ | ------------------------------------------------- |
| `placeOrder`     | Orders             | Spend the vault on supply orders                  |
| `pickupOrder`    | Orders             | Collect ready supply drops                        |
| `orderVan`       | Orders             | Order a replacement van after a loss              |
| `vanCargo`       | Stock & van        | Move stock between warehouse and van              |
| `driveVan`       | Stock & van        | Drive the van out for runs                        |
| `setSalePrice`   | Stock & van        | Edit warehouse-wide sale prices                   |
| `openSale`       | Stock & van        | Start a van sale outside                          |
| `viewFinancials` | Vault & financials | See vault balance, revenue and analytics          |
| `vaultDeposit`   | Vault & financials | Add funds to the vault                            |
| `vaultWithdraw`  | Vault & financials | Take funds out of the vault                       |
| `answerDoor`     | People             | Admit/reject knocks, kick guests                  |
| `manageMembers`  | People             | Add, edit, remove members *(owner-only to grant)* |
| `chatRespond`    | People             | Reply to phone-app messages                       |
