> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_police/installation.md).

# Installation

Step by step documentation how to properly install script.

## Database

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

## General Information

{% hint style="info" %}
🗺️ **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.

This command is **not** for customizing existing maps - adjust those manually instead. You **must** have admin rights to use this command.
{% endhint %}

{% hint style="info" %}
👮 **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.
  {% endhint %}

## 🛠️ Installation Steps

{% stepper %}
{% step %}

### Download the Script

Download `rcore_police` from [CFX Portal](https://portal.cfx.re/assets/granted-assets?page=1\&sort=asset.updated_at\&direction=asc\&search=police).
{% endstep %}

{% step %}

### Place the Files

Open the downloaded `.zip`, copy the `[police]` folder, and put it in your resources folder.
{% endstep %}

{% step %}

### Edit server.cfg

Go to your `server.cfg` and add `ensure [police]`.
{% endstep %}

{% step %}

### Define Your Police Map

To configure your police map, 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.

{% hint style="info" %}

* 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).
* Failed to find your supported police map? Use command `/preset_creator` to use our tool for setting a new map!
  {% endhint %}

{% tabs %}
{% tab title="Standalone" %}
Uses the default Mission Row Police Station setup.

```lua
ensure [police]
```

{% endtab %}

{% tab title="Brofx VSPD" %}
Configures the Brofx VSPD map for Vinewood Police Station.

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

{% endtab %}

{% tab title="Gabz MRPD" %}
Configures the Gabz MRPD map for Mission Row Police Station by Gabz.

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

{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Define Items

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](/paid-resources/rcore_police/integrations/inventory-items.md)

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
   ```

{% hint style="info" %}
`inventory_name` should correspond to the name of your inventory system. Ensure it matches your configuration to avoid errors.

The deployer supports: **mf-inventory** and **es\_extended**. For other inventories, please follow the manual setup guide.
{% endhint %}

</details>

<details>

<summary>Manually Adding Items</summary>

Follow this guide at this page [Inventory](/paid-resources/rcore_police/integrations/inventory-items.md)

</details>
{% endstep %}

{% step %}

### Define ACE Permissions (Standalone servers only)

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
```

{% endstep %}

{% step %}

### Disable Other Police Scripts

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

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

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

{% tab title="QBCore" %}

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

{% tab title="QBOX" %}

* Remove or disable `qbx_policejob`.
* Make sure it's not started in your `start.cfg` or any related QBOX resource configs.
  {% endtab %}
  {% endtabs %}

{% hint style="warning" %}
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.
{% endhint %}
{% endstep %}
{% endstepper %}

## Discord logs

1. Go to `rcore_police/sconfig.lua`
2. Change `SConfig.LogWebhook` value
