> For the complete documentation index, see [llms.txt](https://docs.lostdev.store/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lostdev.store/territories/admin-panel.md).

# Admin Panel

The tactical tablet's **ADMIN** tab lets you manage territories in-game, without editing `config/territories.lua` or restarting the resource.

## Authorization

Two ways to grant access — you only need one:

### Framework permission (recommended)

**QBX (`qbx_core`)**:

```
/setpermission [id] admin
```

Or add the identifier to `qbx_core`'s `admins.json` with the `admin`/`god`/`mod` group.

**QBCore/ESX**: use your framework's own admin group system — anyone in a group listed in `Config.Admin.allowedGroups` gets access automatically.

### ACE permission (fallback)

```cfg
add_ace group.admin territories.admin allow
add_principal identifier.license:xxxxx group.admin
```

{% hint style="info" %}
If access still isn't working after granting one of the above, double-check `Config.Admin.allowedGroups` in `config/config.lua` matches the group name you used.
{% endhint %}

## Available actions

| Action         | Effect                                                                        |
| -------------- | ----------------------------------------------------------------------------- |
| Force owner    | Sets a territory's owner (or clears it to neutral); resets progress/cooldown. |
| Force progress | Sets a territory's control percentage (0-100) without changing its owner.     |
| Full reset     | Returns a territory to neutral — no owner, no progress, no cooldown.          |
| Force cooldown | Puts a territory into cooldown for a chosen duration.                         |
| Clear cooldown | Ends an active cooldown immediately.                                          |
| Create zone    | Creates a new territory at the player's current position.                     |
| Delete zone    | Removes a territory — only for zones created via the Admin panel.             |

Every action is logged (with the reason you provide) and shows up in the tablet's Activity Feed with a shield icon, so other admins can see who changed what and why.

## Create Zone

The form asks for:

| Field       | Required                | Notes                                                       |
| ----------- | ----------------------- | ----------------------------------------------------------- |
| Label       | Yes (min. 2 characters) | Display name.                                               |
| Description | No                      |                                                             |
| Radius      | No                      | Defaults to `Config.Admin.defaultZoneRadius` if left blank. |
| Owner       | No                      | Leave empty for a neutral territory.                        |
| Coordinates | Yes                     | Automatically filled with your current in-game position.    |

The territory id is generated automatically from the label (e.g. "North Port" → `north-port`). New zones inherit capture/cooldown/rewards/blip settings from your global `Config` defaults — customize them further by editing `config/territories.lua` directly if needed.

## Delete Zone

Only territories created via the Admin panel can be deleted this way. Territories defined in `config/territories.lua` are protected — remove them by editing that file instead.

## Configuration flags

```lua
Config.Admin = {
    enabled            = true,  -- fully disables the panel
    allowZoneCreation  = true,
    allowZoneDeletion  = true,
    defaultZoneRadius  = 60.0,
    logChanges         = true,  -- disables audit logging in the Activity Feed
    allowedGroups = { 'admin', 'superadmin', 'god', 'mod', 'moderator' },
}
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lostdev.store/territories/admin-panel.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
