> For the complete documentation index, see [llms.txt](https://duddzy-scripts.gitbook.io/duddzy-scripts-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://duddzy-scripts.gitbook.io/duddzy-scripts-docs/scripts/duddzy-jail/configuration.md).

# Configuration

The config.lua file is the heart of your jail system. Change the settings to your desire.

#### Overview

The `Config` table is divided into logical sections. Always ensure you restart the script after saving changes to this file.

#### 1. Jail Settings

Configure the physical location and behavior of the prison.

| **Setting**              | **Type**  | **Description**                                                       |
| ------------------------ | --------- | --------------------------------------------------------------------- |
| `Config.JailLocation`    | `vector4` | The exact spawn point when a player is jailed (X, Y, Z, Heading).     |
| `Config.PrisonCenter`    | `vector3` | The anchor point used to calculate the jail's escape radius.          |
| `Config.ReleaseLocation` | `vector4` | Where players are teleported when their sentence expires.             |
| `Config.JailRadius`      | `float`   | How far a prisoner can wander from `PrisonCenter` before being reset. |
| `Config.JailJobs`        | `table`   | List of jobs authorized to use the `/jail` and `/unjail` commands.    |

Lua

```
Config.JailJobs = { 'police', 'sheriff' }
```

#### 2. NPC Management

You can define multiple locations for Doctors, Rental NPCs, and the Bail Bondsman.

* Model: Ensure this is a valid GTA V ped model name.
* Coords: Use `vector4` to include the heading (direction the NPC faces).
* Blip: Customize the map icon to help players find these locations.

#### 3. Appearance System

Crucial for ensuring the prison uniform works with your specific clothing script.

This script currently supports: 'illenium-appearance', 'fivem-appearance', 'rcore\_clothing', 'esx\_skin'

Simply set your appearance system in this line of the config.

```
Config.AppearanceSystem = 'illenium-appearance' 
```

> Note: If you switch your clothing script later, simply update this string to match your new system.

#### 4. Prison Outfits

You can define the specific components and props for both male and female inmates.

* Components: Define ID, Drawable, and Texture.
* Props: Use `-1` for the drawable if you want to remove hats or glasses during incarceration.

Lua

```
Config.PrisonOutfit = {
    male = {
        components = {
            { component_id = 3, drawable = 0, texture = 0 },  -- Arms/Torso
            { component_id = 4, drawable = 27, texture = 2 }, -- Pants
            { component_id = 6, drawable = 54, texture = 0 }, -- Shoes
            { component_id = 8, drawable = 15, texture = 0 }, -- Undershirt
            { component_id = 11, drawable = 1, texture = 11 } -- Top
        },
        props = {
            { prop_id = 0, drawable = -1, texture = 0 }, -- Hats (set -1 to clear)
            { prop_id = 1, drawable = -1, texture = 0 }  -- Glasses
        }
    },
    female = {
        components = {
            { component_id = 3, drawable = 14, texture = 0 },	-- Arms/Torso
            { component_id = 4, drawable = 3, texture = 15 },   -- Pants
            { component_id = 6, drawable = 101, texture = 0 },  -- Shoes
            { component_id = 8, drawable = 10, texture = 0 },   -- Undershirt
            { component_id = 11, drawable = 621, texture = 2 }  -- Top
        },
        props = {
            { prop_id = 0, drawable = -1, texture = 0 },	-- Hats (set -1 to clear)
            { prop_id = 1, drawable = -1, texture = 0 }     -- Glasses
        }
    }
}
```

#### 5. Fuel & Utilities

* Config.FuelResource: Set this to your server's fuel script name (e.g., `'ox_fuel'`, `'legacyfuel'`). If you use a custom system, set this to `'custom'` and add your export in the `Config.FuelSystem` function.
* Config.HealDuration: Defined in milliseconds (e.g., `3000` = 3 seconds).

#### 💡 Expert Tips for Config

* **Coordinate Finding:** If you need to find exact coordinates for new locations, use the /coords command to print your current location to the F8 console.
* **Validate your JSON/Tables:** If your server refuses to start after a config change, check for missing commas or brackets. A simple online Lua validator can help if you are unsure.
* **Don't forget the SQL:** If you change the names of your database columns in the script, ensure your SQL database structure is updated to match.
