> For the complete documentation index, see [llms.txt](https://otters-developments.gitbook.io/otters-developments/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://otters-developments.gitbook.io/otters-developments/paid-resources/weapon-licensing.md).

# Weapon Licensing

**Otters Weapon Licensing** is a configurable firearm licensing system for **QBCore, Qbox and ESX**. Players can visit one of your configured licensing locations, select a licence class, complete a timed examination and receive their licence when they pass.

The resource includes licence progression, randomised questions, criminal-record checks, physical licence-item support, Discord logging and an ACE-protected staff management panel.

## Features

* QBCore, Qbox and ESX support with automatic framework detection.
* Multiple configurable licensing peds and locations.
* `ox_target`, `qb-target` and `[E]` interaction fallback support.
* Three configurable licence classes by default: Pistol, SMG and Assault Rifle.
* Licence progression requirements between classes.
* Timed examinations with server-side scoring.
* Random question order for every examination.
* Configurable pass requirement and question timer.
* Criminal-record checking with PS-MDT, LB Tablet, framework metadata or custom SQL.
* `otters_notifications` integration with `ox_lib` fallback.
* Configurable Discord logs for tests, denials and staff licence changes.
* ACE-protected admin panel for granting and revoking licences from online players.
* Optional physical licence items kept in sync when staff grant or revoke a licence.
* Customisable interface accent through `html/css/theme.css`.

## Requirements

The following resources are required:

```
ox_lib
oxmysql
```

You will also need one supported framework:

```
qbx_core
qb-core
es_extended
```

Target, inventory, notification and MDT integrations are selected through the config and can be automatically detected where supported.

## Installation

{% stepper %}
{% step %}

### Place the resource

Place `otters_weaponlicense` inside your server resources folder.
{% endstep %}

{% step %}

### Configure the resource

Configure `shared/config.lua` for your framework, integrations, locations, licences and questions.
{% endstep %}

{% step %}

### Start dependencies first

Ensure the required dependencies start before this resource.
{% endstep %}

{% step %}

### Add the resource to `server.cfg`

```cfg
ensure otters_weaponlicense
```

{% endstep %}

{% step %}

### Grant staff permission

If you want staff to use the licence management panel, grant the ACE permission shown below.

```cfg
add_ace group.admin otters_weaponlicense.admin allow
```

The default admin configuration also recognises `group.admin` and `group.god` unless you remove those entries from `Cfg.Admin.acePermissions`.
{% endstep %}
{% endstepper %}

## Staff command

```
/weaponlicenseadmin
```

Only players passing one of the configured server-side ACE checks can open or use the admin panel.

## Editable files

The Asset Escrow release leaves these files editable:

```
shared/config.lua
html/css/theme.css
```

Use `shared/config.lua` for resource behaviour and `theme.css` for the interface colour variables.


---

# 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 following URL with the `ask` and `goal` query parameters:

```
GET https://otters-developments.gitbook.io/otters-developments/paid-resources/weapon-licensing.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 `build a script that syncs our docs to a CMS` 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.
