> 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_prison/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" %}
🗺️ **Note about the RCore Prison Map:**

The included RCORE Prison map **does not have a visitation room**, and the **canteen is located in a different section** of the prison (marked as a C on the map).

If you are migrating from **QBOX** or **QBCore**, those frameworks may come with a different prison map that **includes a visitation area**.

Our MLO is located at `vector3(1691.44, 2568.25, 45.56)`.
{% endhint %}

{% hint style="info" %}
🗺️ **Note about the Community service:**

The locations are set only to Los Santos (City) not outside of it.

It cannot be changed to different location.
{% endhint %}

{% hint style="info" %}
🗺️ **Note about the prisoners not being teleported back to prison**

The Prison check by default in 1 minute cycle if prisoner run from prison, when not doing prison break way and teleport him back.

The area is polyzone, its not distance based
{% endhint %}

{% hint style="info" %}
🗺️ **A Quick Note About Doors**

Just a heads-up: the prison doesn't come with specific door locations on the map. If you need doors for your prison setup, feel free to add them wherever you like—they're completely up to you!
{% endhint %}

## 🗺️ Supported Maps

* RCore Prison (`rcore_prison_map`)
* GABZ Prison (`cfx-gabz-prison`)
* Desertos Prison (`Prisonmainblock`)
* Molo's Alcatraz Prison (`molo_alcatraz`)
* Prompt's Prison (`cfx_prompt_Bolingbroke_Prison_Interiors`)
* YBN Prison (`YBNPrison`)
* Uncle Just Prison (`int_prison`)

{% hint style="warning" %}
Prison Break is not supported for Molo's Alcatraz Prison!
{% endhint %}

## 🛠️ Installation Steps

{% stepper %}
{% step %}

### Download the Script

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

{% step %}

### Place the Files

Open the downloaded `.zip`, copy the `[prison]` 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&amp;token=8cf35c7d-8f0b-4675-be54-c72b12b1ed27" alt="Resource Folder"><figcaption><p>Resources folder</p></figcaption></figure>

</details>
{% endstep %}

{% step %}

### Edit server.cfg

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

{% step %}

### Define Your Prison Map

To configure your prison map, ensure the correct map resources are included in your `server.cfg`. Below are configuration examples for **Standalone**, **Custom Prison Map**, and **RCORE** setups.

{% hint style="info" %}
If an unsupported map is loaded, a **Standalone configuration** will be applied by default, using the standard prison yard.
{% endhint %}

{% tabs %}
{% tab title="Standalone" %}
Uses the default prison yard.

```lua
ensure [prison]
```

{% endtab %}

{% tab title="Your map" %}
Configures the prison map you have defined.

```lua
ensure your_prison_map
ensure [prison]
```

{% endtab %}

{% tab title="RCORE" %}
Configures the **RCORE Prison** map that comes included with the `[prison]` resource.

**Path to Map Files:**

You can find the RCORE prison map and models in the following locations:

* Map folder: `resources/[prison]/rcore_prison/includedMaps/rcore_prison_map`
* Models folder: `resources/[prison]/rcore_prison/includedMaps/rcore_prison_models`

**How to Extract:**

To use the map and models directly in your server's resource system, follow these steps:

1. Navigate to: `resources/[prison]/rcore_prison/includedMaps/`
2. Copy the folders:
   * `rcore_prison_map`
   * `rcore_prison_models`
3. Paste both folders directly into your main `resources/` directory.

```lua
ensure rcore_prison_models
ensure rcore_prison_map
ensure [prison]
```

{% hint style="info" %}
🗺️ **Note about the RCore Prison Map:**

The included RCORE Prison map **does not have a visitation room**, and the **canteen is located in a different section** of the prison (marked as a C on the map).

If you are migrating from **QBOX** or **QBCore**, those frameworks may come with a different prison map that **includes a visitation area**.
{% endhint %}
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Define Items

To define items in the RCore Prison script, you can either use the Deployer command or edit the configuration manually.

* Item definitions can be found at `rcore_prison/inventory_items.lua`
* Item images are located in `rcore_prison/assets/inventoryImages`

<details>

<summary>Using the Deployer command</summary>

Full guide at this page [Inventory](/paid-resources/rcore_prison/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
   prisonsetup mf-inventory
   prisonsetup 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_prison/integrations/inventory-items.md)

</details>

{% hint style="info" %}
🔄 **Server items** If you've made any changes to your items (or just defined them for the first time), don't forget to restart your server. This ensures all your custom items get properly registered into the system and everything works smoothly.
{% endhint %}
{% endstep %}

{% step %}

### Define ACE Permissions

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

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

{% endstep %}
{% endstepper %}

## Discord logs

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