# Installation

## Database

The database will be imported automatically for you when you start the resource for the first time.

## General Information

> 🗺️ **How to Define a Non-Supported Map**
>
> To define a non-supported map, follow these steps:
>
> 1. **Enter the game and open the chat.**
> 2. Type the command `/preset_creator`.
> 3. A short form will appear—fill it out and follow the on-screen instructions until you're done.
>
> **Note:**
>
> * This command is **not** for customizing existing maps—adjust those manually instead.
> * You **must** have admin rights to use this command.

***

> 👮 **How to Handle Duty Within Police Job (with your resource/logic)**
>
> Duty system logic is handled in:\
> `rcore_police\modules\bridge\server\duty`
>
> * If your system is **supported out of the box**, it will automatically use the integrated logic.
> * If your system is **not supported**, it will default to the standalone method.
> * You can also define your **own custom logic** in this module as needed.

## Script

1. [Download the script from Keymaster](#script-download).
2. [Place the files in the resources folder](#place-files).
3. [Edit the server.cfg](#edit-server-cfg).
4. [Define server maps](#edit-server-cfg-maps).
5. [Define items using Deployer or manually](#define-items).
6. [Define permissions (standalone servers only)](#define-permissions).
7. [Disable Conflicting Police Scripts](#other-police-scripts).
8. [Start the server](#start-server).

***

### Step 1: Download the Script <a href="#script-download" id="script-download"></a>

* Download the script from [keymaster](https://keymaster.fivem.net).

***

### Step 2: Place the Files <a href="#place-files" id="place-files"></a>

* Open the downloaded `.zip`, copy the `[police]` folder, and put it in your resources folder.

<details>

<summary>Resource folder image</summary>

<figure><img src="https://1037498771-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZErcztD5BvrKnwRGJq%2Fuploads%2Fgit-blob-5da6abaee2bea30f081554fd6b2d242785752cee%2Fprison_setup_folder.png?alt=media" alt="Resource Folder"><figcaption><p>Resources folder</p></figcaption></figure>

</details>

***

### Step 3: Edit server.cfg <a href="#edit-server-cfg" id="edit-server-cfg"></a>

Go to your `server.cfg` and add `ensure [police]`.

### Step 4: Define your police map <a href="#edit-server-cfg-maps" id="edit-server-cfg-maps"></a>

* To configure your police maps, ensure the correct map resources are included in your server.cfg.
* Below are configuration examples for the Default MRPD, Brofx VSPD, and Gabz MRPD maps.

**Note:**

* If an unsupported map is loaded, a **Standalone configuration** will be applied by default, using the standard Mission Row Police station.
* The map system supports multiple police stations running simultaneously.
* Additional maps will be configured in future update(s).

{% hint style="warning" %}
Failed to find your supported police map? Use command /preset\_creator to use our tool for setting new map!
{% endhint %}

<details>

<summary>Standalone</summary>

* Description: Uses the default Mission Row Police Station setup.

```lua
ensure [police]
```

</details>

<details>

<summary>Brofx VSPD</summary>

* Description: Configures the Brofx VSPD map for Vinewood Police Station.

```lua
ensure brofx_vspd
ensure [police]
```

</details>

<details>

<summary>Gabz MRPD</summary>

* Description: Configures the Gabz MRPD map for Mission Row Police Station by Gabz.

```lua
ensure cfx-gabz-mrpd
ensure [police]
```

</details>

***

### Step 5: Define Items <a href="#define-items" id="define-items"></a>

* To define items in the RCore Police script, you can either use the Deployer command or edit the configuration manually.
* Item definitions can be found at `rcore_police/inventory_items.lua`
* Item images are located in `rcore_police/assets/inventoryImages/`

<details>

<summary>Using the Deployer command</summary>

* Full guide at this page [Inventory](https://documentation.rcore.cz/paid-resources/rcore_police/inventory)

1. Start the server.
2. Open the server console (`txAdmin - Live console`)
3. Type the following command to automatically define items:

   ```bash
   policesetup mf-inventory
   policesetup es_extended
   ```

> **Note:** `inventory_name` should correspond to the name of your inventory system. Ensure it matches your configuration to avoid errors.

> **Note:** The deployer supports: **mf-inventory** and **es\_extended**. For other inventories, please follow the manual setup guide.

</details>

<details>

<summary>Manually Adding Items</summary>

* Follow this guide at this page [Inventory](https://documentation.rcore.cz/paid-resources/rcore_police/inventory)

</details>

***

***

### Step 6: Define ace permissions (Standalone servers only) <a href="#define-permissions" id="define-permissions"></a>

* Add to bottom of server.cfg permission part (script need this permission to use properly ACE permission)

```lua
add_ace resource.rcore_police command.add_ace allow
add_ace resource.rcore_police command.remove_ace allow
add_ace resource.rcore_police command.add_principal allow
add_ace resource.rcore_police command.remove_principal allow
```

***

### Step 7: Disable Other Police Scripts <a href="#other-police-scripts" id="other-police-scripts"></a>

If you're using a different police job framework, make sure to stop or remove the corresponding script to avoid conflicts.

#### 🚫 For ESX:

* Remove or disable `esx_policejob` from your `resources` folder.
* Ensure it is not started in your `server.cfg`.

#### 🚫 For QBcore:

* Remove or disable `qb-policejob`.
* Comment out or delete the `ensure qb-policejob` line in your `server.cfg`.

#### 🚫 For QBOX:

* Remove or disable `qbx_policejob`.
* Make sure it’s not started in your `start.cfg` or any related QBOX resource configs.

> ⚠️ Having multiple police job scripts active can cause conflicts, broken menus, or roleplay issues. Always ensure only one police job system is active at a time.

***

### Step 8: Enjoy <a href="#start-server" id="start-server"></a>

* Start your server and enjoy RCore Police.

***

## Commands

You can adjust all command names in config.lua

| Command          | Description                                                             |
| ---------------- | ----------------------------------------------------------------------- |
| /knee            | This is used for allowing to player knee on ground                      |
| /preset\_creator | This is used for admin defining new department map which is not defined |

## Interact keys (key mapping)

| Key | Description                                           |
| --- | ----------------------------------------------------- |
| H   | This is used for tackling closest player              |
| X   | This is used for hands up                             |
| F5  | This is used for opening/closing included radial menu |
| F6  | This is used for opening/closing job menu             |
| N   | This is used for opening/closing police radar         |

## Useable items

| Label          | Description                                                       | Item name       |
| -------------- | ----------------------------------------------------------------- | --------------- |
| Paper Bag      | This is used for putting paper bag on player                      | paper\_bag      |
| Zip ties       | This is used for cuffing player with zip ties                     | zipties         |
| Spikes         | This is used for stopping vehicles                                | spikes          |
| Speed camera   | This is used for fining citizen going over specific speed in area | speed\_camera   |
| Handcuffs      | This is used for cuffing player                                   | handcuffs       |
| Handcuffs keys | This is used for removing zipties/handcuffs from player           | handcuffs\_keys |
| Barrier        | This is used for placing barrier                                  | barrier         |
| Megaphone      | This is used for shouting over citizen when far-away              | megaphone       |

## Discord logs

1. Go to rcore\_police/sconfig.lua
2. Change SConfig.LogWebhook value


---

# Agent Instructions: 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:

```
GET https://documentation.rcore.cz/paid-resources/rcore_police/install_page.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
