# FAQ

***

## 🗺️ Where Do I Customize the Configuration of My Police Map?

* You can customize police map settings and points in the following location:
* Inside this folder (`rcore_police/data/maps`), you'll find files for each supported map (e.g., `mrpd.lua`, `sandy_pd.lua`, etc.).
* Open the file that matches your map and edit the points and settings as needed for your server.

> **Note:**\
> If your map isn’t specifically supported (no matching `.lua` file is found), the script will automatically use `default-mrpd.lua` as a fallback configuration.

***

**Tip:**

* For unique or custom maps, use `/preset_creator` in-game to define new map. (requires: admin rights)

## 🚗 Where Do I Define Garage Vehicles and Weapon Shop Items for Officers?

* All police garage vehicles and shop items are managed inside your `config.lua` file, under the `JobGroups` section.

### 🚙 Police Garage Vehicles

* To add, remove, or edit available vehicles for each police job (like police or sheriff):

1. **Open your `config.lua`.**
2. Find the relevant job group (e.g., `'police'` or `'sheriff'`).
3. Under `VehiclesToGrade`, update:
   * `storage`: List all vehicles, their names, models, images, and prices.
   * `access`: Set which job grade can access each vehicle.

**Example:**

```lua
VehiclesToGrade = {
    storage = {
        ['police3'] = { label = "Police Cruiser (A)", model = 'police3', price = 300 },
        ['polmav'] = { label = "Police Maverick", model = 'polmav', price = 300, isAir = true },
        -- more vehicles...
    },
    access = {
        [0] = { "police3", "polmav" },
        [3] = { "police4" },
        [5] = { "*" }, -- "*" means all vehicles for this grade
    }
}
```

### 🛒 Weapon/Equipment Shop

* To set what items your officers can buy or take:

1. Open your `config.lua`.
2. In the same job group, look for the `Store` section.
3. Under `storage`, add or remove items (with their label and price).
4. Under `access`, set which items each job grade can access.

**Example:**

```lua
Store = {
    storage = {
        [Items.Spikes] = { label = "Spikes", price = 0 },
        ['WEAPON_NIGHTSTICK'] = { label = "Nightstick", price = 500 },
        ['radio'] = { label = "Radio", price = 250 },
        -- more items...
    },
    access = {
        [0] = { "WEAPON_NIGHTSTICK", "radio", Items.Spikes },
        [3] = { "weapon_carbinerifle" },
        [5] = { "*" },
    }
}
```

> **Note:**\
> All higher grades automatically inherit access to items and vehicles from lower grades—no need to define them again! 😊

## 🗃️ Having trouble opening your stashes or searching other players?

* This usually happens if you’re using an **unsupported inventory** system, or if the inventory author has changed how their exports or events work.
* Double-check for **updates** to your inventory, and feel free to reach out to the inventory author if you’re unsure.
* If you’re running a **modified** or out-of-date inventory, support might not be available. For the best experience, always use the **official, latest supported versions**.

***

## 🤔 Escort Feature Not Working Properly? (Strange Behavior When Putting In/Out of Vehicle)

* If you notice that escorting a player acts strangely, or you can't re-escort them after putting them in or out of a vehicle, here’s what to check:

**Reason:**

* This usually happens if you’re running another third-party resource that interferes with player handling or police actions.
* We use **emulated functions** from popular scripts like `qb-police`, `qbx`, or `esx_policejob` to maximize compatibility.
* However, if you have another resource doing similar things (like custom escort, drag, or put-in-vehicle code), it can cause weird conflicts.

**How to fix:**

* **Disable any other third-party police or escort-related scripts** to avoid conflicts.
* Make sure you’re only running the police resource you intend to use.

> **Tip:**\
> If you need to use custom features from a third-party script, make sure they’re not conflicting with rcore\_police’s built-in functionality.

***

## 🚓 Why can't a player be put in a vehicle without cuffs?

* This is working as intended!
* A player **must be cuffed before they can be placed into a vehicle** by police or staff.

> **Why?**\
> Requiring cuffs makes sure the player is properly handled while in the vehicle—so they can’t escape, exploit, or glitch out.\
> It helps prevent unwanted situations where an uncuffed player could exit the car or interfere with the roleplay scenario.

If you want to move a player to a vehicle, make sure to cuff them first using the appropriate command or menu option.

## 👮‍♂️ Can't open the job menu after being downed & revived?

If you can’t open your F2 job menu after being revived, try this:

1. **Check your config:**
   * Open your `config.lua` in `rcore_police`.
   * Find this section:

     ```lua
     Flags = {
         SkipDeathCheck = false, -- This allows to skip death check (helpful when issue with accessing menu / not running supported death system)
     },
     ```
   * **Set `SkipDeathCheck` to `true`:**

     ```lua
     Flags = {
         SkipDeathCheck = true,
     },
     ```
2. **Save your changes and restart your server/resource.**

***

> **Tip:**\
> Setting `SkipDeathCheck` to `true` tells rcore\_police to ignore the "dead" state check—so the F2 menu will work, even if there’s a death state issue or your server uses a custom death system.

***

### ℹ️ Why does this happen?

* Many servers use custom revive or death systems (for example, a modified ambulance job or custom logic using player death metadata).
* These scripts can handle the player's "dead" state in ways rcore\_police doesn't recognize, especially if the framework's death metadata is customized.
* As a result, rcore\_police may still think a player is dead after they’re revived—blocking features like the F2 menu.

> **Important:**\
> Setting `SkipDeathCheck` to `true` makes rcore\_police ignore the "dead" check so the F2 menu works with your custom death system.\
> **However:** Some features (like "escort" or picking up a downed player) may not work correctly if rcore\_police can’t reliably tell who’s dead or alive with your custom logic.
>
> If your death system and framework metadata aren’t fully compatible, some advanced features may not behave as expected.

***

## 🗺️ How to Define a Non-Supported Map

* Want to add your own map that isn’t officially supported yet? Here’s how:

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 if needed.
> * You **must have admin rights** to use this command.

***

## 👮‍♂️ Can I add more than one department/job to rcore\_police?

Yes, you can absolutely have more than one law enforcement job (e.g., `police`, `sheriff`, `ranger`, etc.) in **rcore\_police**.

By default, the configuration might look like this:

```lua
Jobs = { 'police', 'sheriff' },

-- To add a third job (e.g., ranger), simply modify it:

Jobs = { 'police', 'sheriff', 'ranger' },
```

Path: `rcore_police/data/maps/default-mrpd.lua`

> 💡 **Tip:**\
> If you're adding a job that isn't `police` or `sheriff`, you must also register it under `JobGroups` in the config.\
> This ensures the new job has access to all job-related menus and features, such as:
>
> * 🌀 Radial menu options
> * 🎯 Target interactions
> * 🧭 Job UI features
>
> 📁 **Path:**\
> `rcore_police/config.lua`

## 📦 Script is throwing an error in F8: `?-1: attempt to index a nil value (field "Config")`

This error typically occurs when there's a **syntax error** in your configuration, often when modifying the **Database**, **Clothing**, **Inventory**, **Framework**, or **Prison** settings.

#### ❌ Common Mistakes:

* **Incorrect Framework or Inventory names**:\
  If you set something like:

  ```lua
  Framework = qb-core
  Framework = QB-Core
  Inventories = OX
  ```

#### Correct Usage:

🔧 AUTO\_DETECT: If you're unsure about the correct configuration, **AUTO\_DETECT** will automatically detect and configure the supported scripts for you. There's no need to manually set the framework or inventory if you use this option.

> 💡 **Tip:**\
> Always double-check your config for typos or incorrect casing. Using **AUTO\_DETECT** is a simple and effective way to avoid this issue.

Ensure you use the proper structure and casing for each framework and inventory:

#### Framework Settings:

* `Framework = Framework.QBCore` (for `qb-core`)
* `Framework = Framework.ESX` (for `es_extended`)
* `Framework = Framework.QBOX` (for `qbx_core`)

#### Inventory Settings:

* `Inventories = Inventories.OX` (for `ox_inventory`)

## 🌀 How can I change or remove options from the radial menu?

The radial menu options are located in: `modules\bridge\client\interact\cl-interact-radial.lua`.

## Where do I set zones to use the target system?

To enable interactions with zones using a target system (such as `ox_target` or `qb-target`), follow these steps:

1. Open the file: `rcore_police/config.lua`
2. Find the setting called `UseTargetForZones` and set it to `true`:

```lua
UseTargetForZones = true
```

3. Restart rcore\_police and enjoy!

## 📦 Why can't I open job stashes or search players?

If you're experiencing issues with searching players or opening job stashes, it's likely related to your **inventory system**.

#### 🔍 Common Causes:

* **Unsupported or outdated inventory**: If you're using an outdated version of the inventory, it may not support the required features for interacting with stashes or searching players.
* **Changes to required `exports` or `events`**: The inventory you're using may have **removed, renamed, or altered** the exports or events needed for stashes and player search functionality.

#### ✅ What You Should Do:

1. **Ensure you're using the latest version** of your inventory system. Updating to the most recent version can resolve compatibility issues.
2. **Confirm the inventory has the required exports/events**:
   * From our side, **we rely on the official API (exports/events)** provided by the inventory author to open stashes and search players.
   * If the API has changed recently, let us know! We can look into the issue from our side and help adjust compatibility.
3. **Check for conflicts with modified or custom inventories**:
   * **Custom** or heavily **modified inventories** are not officially supported, and they may cause issues with accessing job stashes or searching players.
   * Always use **officially supported versions** for proper functionality.

#### 🔧 Testing and Debugging

If your inventory is throwing errors, make sure to update it to the latest version. After updating, if there are no errors but stashes or searches still don't work, it’s possible the API has changed. In that case, let's check it out together!

We’ve added some **helper commands** specifically for admins to help you verify the functionality of player searches and job stashes:

* `rcore_police_inventory_test_search_self`
* `rcore_police_inventory_test_stash_self`

These commands will test the functionality locally for an admin. However, please note that these may **not work with some inventories** depending on how they are structured.

> ❗ **Note:**\
> Custom, heavily modified, or older versions of supported inventories are **not officially supported**.\
> Please check with the inventory's author or their documentation for compatibility.

## Unable to access boss menu ❓

If you’re using **job creator** resources (e.g. *jaksam*, *lunar*, *qs*), your **boss grade** might not be named exactly `"boss"`.\
For **QBCore/QBox**, some setups use `isBoss = true`, others rely on `grade_name == "boss"`.\
Because creators often rename the boss grade (e.g. `"chief"`), **configure it explicitly** in `config.lua`.

***

### Configure boss ranks

**File:** `config.lua`

```lua
RanksAsBossList = {
    ['chief'] = true,
    ['boss']  = true,
}
```

> Keys are **grade\_name** strings. Add every grade that should open the boss menu.

***

### Quick setup (recommended)

1. **Set yourself** to the grade you want to be boss:

   ```lua
   /setjob playerId police <gradeNumber>
   ```

* `playerId` = player’s ID from **txAdmin → Live Console**\
  \&#xNAN;*(e.g. `John Doe (1)` → ID = `1`).*

2. **Run the helper** to detect the current grade and get the exact name:

   ```lua
   /rcore_police_help_boss_setup
   ```
3. **Copy the printed `grade_name`** into `RanksAsBossList` in `config.lua`.
4. **Restart** the resource (or the server).

**Example result:**

```lua
RanksAsBossList = {
    ['chief'] = true,
    ['boss']  = true,
    ["captain"] = true, -- Your new boss grade
}
```

***

### Notes

* If your framework uses `isBoss = true`, still define the grade name here to be safe.
* Using a job creator? Check what it names the top grade (e.g. `chief`, `owner`, `manager`) and add it.
* After changes, verify in-game: your character with that grade should see the **Boss Menu**.

## RCore Police – Standalone Usage

### ⚠️ Important

Before using `/setjob` on standalone servers, make sure to define ACE permissions:\
👉 [Define ACE Permissions – Standalone Servers Only](/paid-resources/rcore_police/install_page.md#define-permissions)

***

### Assigning police job

```lua
/setjob playerId police 4
```

* `playerId` = player’s ID from **txAdmin → Live Console**\
  \&#xNAN;*(e.g. `John Doe (1)` → ID = `1`).*

***

### Permissions

By default allowed for:

* `group.owner`
* `group.admin`

***

### Assigning someone into a group with ACE

```lua
add_principal identifier.discord:yourDiscordId group.admin
```

* `yourDiscordId` = your **Discord identifier**, not the txAdmin number.
  * You can find it in the server console or logs (usually looks like `discord:175187745935851521`).

This line assigns that Discord account to the **`group.admin`** permission group.

> After this, running `/setjob` should confirm your group (e.g. `group.admin` or `group.owner`).

***

### Custom groups

You only need to edit **`configs/permissions.lua`** if you are using different groups:

```lua
PermissionMap = {
    ['group.superadmin'] = { Permissions.HAS_SERVER_GROUP },
    ['group.mod']       = { Permissions.HAS_SERVER_GROUP },
}
```

***

### Fallback

If no mapping matches, **RCore Police** falls back to ACE permissions:

```lua
if IsPlayerAceAllowed(client, 'command') then
    retval = true
end
```

This means that if a player has the generic ACE right `command`, they will still be allowed.\
While this ensures there’s always a fallback, it’s recommended to **explicitly define your groups** in `PermissionMap` for proper control.

***

### 📖 Learn more: ACE Permissions

For a full explanation of how ACE permissions and principals work, see the community guide:\
👉 [Basic Aces & Principals Overview (Cfx.re Forum)](https://forum.cfx.re/t/basic-aces-principals-overview-guide/90917)

## 🔒 Cuffed Player Restrictions – FAQ

### ❓ Can I disable the need to cuff someone before placing them in a vehicle?

Yes — you can! This is useful for handling downed or dead players.

📁 **File:** `config.lua`\
🔧 **Setting:**

```lua
CuffsRequiredForTransport = false
-- When false: You can place players in vehicles even if they're not cuffed.
-- When true: Only cuffed players can be placed into vehicles.
```

### ❓ Where can I disable sprint for cuffed players?

📁 **File:** `config.lua`\
🔧 **Setting:**

```lua
DisableSprintForCuffedPlayers = true
-- When true: Cuffed players cannot sprint.
-- When false: Sprinting is still allowed while cuffed.
```

### ❓ Where can I disable walking for cuffed players?

📁 **File:** `config.lua`\
🔧 **Setting:**

```lua
DisableWalkForCuffedPlayers  = true
-- When true: Cuffed players cannot walk at all (they will be frozen or fully restricted).
-- When false: Cuffed players can still walk normally.
```

### ❓ Where can I disable inventory access for cuffed players?

📁 **File:** `config.lua`\
🔧 **Setting:**

```lua
DisableInventoryWhileCuffed  = true
-- When true: Cuffed players cannot open their inventory.
-- When false: Cuffed players can still access their inventory.
```

## 📸 How to Set Up the Camera Item

The Camera Item lets players take and save in-game screenshot.

To get it working, follow these steps:

***

### 1 Install Requirements

Before enabling the Camera Item, make sure your server has:

* [screencapture](https://github.com/itschip/screencapture/releases/download/v0.9.2/screencapture.zip)
* A supported inventory system with **metadata** support (e.g. `ox_inventory`, `qb-inventory`, `tgiann-inventory`)
* An **API Key** from one of these services:
  * [FiveManage](https://app.fivemanage.com/dashboard/) - API Tokens
  * [FiveMerr](https://fivemerr.com/dash/) - API Tokens

***

### 2 Configure Your API Key

Open your `sconfig.lua` and edit the **Image section**:

```lua
ServerConfig = {
    Image = {
        Service = Images.FIVEMANAGE, -- Or Images.FIVEMERR depending on your provider
        ApiKey = "YOUR_API_KEY_HERE", -- Replace with your real API key
        Settings = {
            encoding = "webp",
            maxWidth = 1920,
            maxHeight = 1080,
            quality = 0.6
        },
        CustomConfig = {
            url = "",
            authType = "header"
        }
    }
}
```

### 3 Enable the Camera Item

Open your `config.lua` and change the configuration like bellow.

```lua
Image = {
    AllowCameraItem = true,
}
```

By default, this is set to false.

### 4 Define Inventory Items

Open **`rcore_police/inventory_items`** and add definitions for the **camera** and **photo** items in your inventory system.

📂 Item images are located here: **`rcore_police/assets/InventoryImages`**

### 5 Enjoy

🎉 If everything is set up correctly, the **Camera Item** will work and players will be able to take photos that can be saved an viewed later.

> 💡 Tip: Make sure the screencapture resource is installed and running on your server — otherwise the camera function will be automatically disabled.


---

# 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/faq_index.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.
