> For the complete documentation index, see [llms.txt](https://fantasy-scripts.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fantasy-scripts.gitbook.io/docs/police-system/installation.md).

# Installation

## Installing fs-police

A NoPixel V inspired police system for ESX, QBCore and Qbox: the MDT tablet, dispatch, the police radio, duty, the garage, the armory, the radar, evidence and everything officers do on the street.

Go through the steps in order. Most servers are done in about twenty minutes.

***

### 1. What you need

| Resource                                         | Needed?                             | What for                                                                                                                                            |
| ------------------------------------------------ | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| **oxmysql**                                      | yes                                 | the database                                                                                                                                        |
| **ox\_lib** (Fantasy Scripts' NoPixel V version) | yes                                 | the \[E] prompts, the radial menu, progress bars. The ordinary ox\_lib does not have the \[E] prompts fs-police uses.                               |
| **es\_extended**, **qb-core** or **qbx\_core**   | yes                                 | your framework; fs-police finds it by itself                                                                                                        |
| **ox\_inventory**                                | strongly advised                    | lockers, evidence lockers, searching people, serial numbers on guns, evidence bags. Without it those parts are switched off or simpler (see below). |
| **pma-voice**                                    | for the radio                       | the voices on the radio                                                                                                                             |
| **screenshot-basic**                             | for the PD camera                   | photos for the MDT gallery and mugshots                                                                                                             |
| **fs-shops** 1.0.2 or newer                      | for the armory or use ox\_inventory | the armory store screen                                                                                                                             |

Without ox\_inventory:

* there are no personal lockers, evidence lockers or person searches;
* picking evidence up files its lab report in the MDT at once (there are no evidence bags);
* guns from the armory have no serial number.

***

### 2. Put the folder in place

Copy the `fs-police` folder into your `resources` folder and add it to `server.cfg` **after** everything it uses:

```
ensure oxmysql
ensure ox_lib
ensure es_extended        # or qb-core / qbx_core
ensure ox_inventory
ensure pma-voice
ensure screenshot-basic
ensure fs-shops
ensure fs-police
```

If you run **qb-policejob**, stop it: two police scripts fight over the same jobs, keys and events. fs-police answers the alerts other scripts send to qb-policejob, so robberies and the like still reach your officers.

***

### 3. The database

Nothing to do. The first time fs-police starts it makes its own tables (they all start with `fs_police_`) and fills the MDT's list of citizens with the characters already on your server, a few hundred at a time.

If you would rather do it yourself, import `sql/install.sql` and set `autoInstall = false` in `config/config.lua`.

**ESX only:** a busy ESX server looks people's cars and licences up faster with `sql/esx_speed.sql` imported. fs-police says so in the console when it would help.

***

### 4. The items

Officers need handcuffs, test kits, barriers and evidence bags. Add them to your inventory before you start: **see `docs/ITEMS.md`**, and copy the pictures from `docs/images/` into your inventory's picture folder.

***

### 5. Your police jobs

Open `config/departments.lua`. Each department lists the job names that belong to it:

```lua
lspd = { label = 'LSPD', name = 'Los Santos Police Department', jobs = { 'police' }, colour = '#5aa9ff' },
```

Put your own job names there. The job grade is the officer's rank. Below the departments, `Config.Permissions` says which rank may do what. The numbers are grades: `3` means grade 3 and up.

***

### 6. Staff commands

Placing things on your map uses `/pdcoords`, which only staff may use. Add this to `server.cfg`:

```
add_ace group.admin command.pdcoords allow
```

***

### 7. Start it

Restart the server (or `ensure fs-police`) and look at the console. A good start ends with:

```
[fs-police] ready on ESX Legacy -- 3 departments
```

If something is missing, fs-police says what in plain words: a table it could not make (it stays closed until that is fixed), a framework it could not find, another police script running alongside it, or the ordinary ox\_lib instead of ours.

***

### 8. Your map

The places in `config/` (the station desk, lockers, armory clerk, garage kiosk, security cameras, Forensic Lab) are set for GTA's own Mission Row police station. If you use a different station building, move them: **see `docs/PLACES.md`**.

***

### 9. Choices worth a look

| File                   | What to look at                                                      |
| ---------------------- | -------------------------------------------------------------------- |
| `config/config.lua`    | duty command, how fines are paid, which jail, the MDT's report kinds |
| `config/armory.lua`    | who pays (officer, department, free), prices, ranks                  |
| `config/fleet.lua`     | the police cars, how many, who may take them                         |
| `config/radio.lua`     | police frequencies per department                                    |
| `config/dispatch.lua`  | which crimes send an alert, where alerts sit on screen               |
| `config/evidence.lua`  | how long evidence lasts, gloves, the lab                             |
| `config/penalcode.lua` | the charges, fines and months                                        |
| `config/themes.lua`    | the colours                                                          |
| `locales/en.lua`       | every word players read                                              |

Restart fs-police after changing a setting.


---

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://fantasy-scripts.gitbook.io/docs/police-system/installation.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 `automate deployments from our CI pipeline` 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.
