> 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/troubleshooting.md).

# Troubleshooting

Here you'll find a quick and easy guide to troubleshooting tips for common issues.

Solutions to the most common issues with `rcore_police`.

***

## 🎒 Inventory

<details>

<summary>Can't open job stashes or search players.</summary>

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**:
   * 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.

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

* `rcore_police_inventory_test_search_self`
* `rcore_police_inventory_test_stash_self`

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

</details>

***

## 🤝 Escort

<details>

<summary>Escort feature not working properly (strange behavior when putting in/out of vehicle).</summary>

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.

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

</details>

***

## 🪪 Job Menu

<details>

<summary>Can't open the job menu after being downed &#x26; revived.</summary>

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.**

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

**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.

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

</details>

***

## ⚠️ Config Errors

<details>

<summary>Script is throwing an error in F8: <code>?-1: attempt to index a nil value (field "Config").</code></summary>

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, for example:

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

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

{% hint style="info" %}
Always double-check your config for typos or incorrect casing. Using **AUTO\_DETECT** is a simple and effective way to avoid this issue.
{% endhint %}

</details>

***

## 👑 Boss Menu

<details>

<summary>Unable to access boss menu.</summary>

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** (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**.

</details>
