# Config

### Third party integrations

<pre class="language-lua"><code class="lang-lua"><strong>Location: rcore_prison/configs/config.lua
</strong></code></pre>

{% content-ref url="<https://github.com/rcore-cz/rcore_docs/blob/master/paid-resources/rcore_prison/v1/integrations/README.md>" %}
<https://github.com/rcore-cz/rcore_docs/blob/master/paid-resources/rcore_prison/v1/integrations/README.md>
{% endcontent-ref %}

#### Telephone Booth - phone

Before you use booth module you should define what phone are you using in config.js config file.

* Only for supported phones!

```
-- Location: rcore_prison/web/config.js
```

```

* For qs-smartphone use config qb-phone.

const CONFIG = {
    "phoneLenght": 10, // "npwd - 10", "gksphone: 10, qb-phone: "10",
    "phoneFormat": "gksphone" // "npwd", "gksphone", "qb-phone",'
}
```

#### rcore\_basketball

rcore\_basketball - optional data that support our interior presets

```
-- Location: rcore_basketball/config.lua ['BasketballHoops']
```

```
# ['rcore_prison_map']

BasketballHoops = {
    {
        pos = vector3(1671.640381, 2502.784912, 44.557003), 
        rot = vector4(0.000000, 0.000000, 0.942665, 0.333741),
        State = nil,
        Model = `prop_basketball_net`,
        IsSubscribed = false,
        threePointFwdDist = 0.0,
        threePointSideDist = 0.0,
        threePointRadius = 30.0,
        hideBlip = true,
    },

    {
        pos = vector3(1689.102173, 2523.121094, 44.641594), 
        rot = vector4(0.000000, 0.000000, -0.329191, 0.944263),
        State = nil,
        Model = `prop_basketball_net`,
        IsSubscribed = false,
        threePointFwdDist = 0.0,
        threePointSideDist = 0.0,
        threePointRadius = 30.0,
        hideBlip = true,
    },

    {
        pos = vector3(1729.442505, 2525.064697, 44.558537), 
        rot = vector4(-0.000000, 0.000000, 0.965665, -0.259790),
        State = nil,
        Model = `prop_basketball_net`,
        IsSubscribed = false,
        threePointFwdDist = 0.0,
        threePointSideDist = 0.0,
        threePointRadius = 30.0,
        hideBlip = true,
    },

    {
        pos = vector3(1718.615479, 2545.604004, 44.588676), 
        rot = vector4(0.000000, 0.000000, 0.239589, 0.970874),
        State = nil,
        Model = `prop_basketball_net`,
        IsSubscribed = false,
        threePointFwdDist = 0.0,
        threePointSideDist = 0.0,
        threePointRadius = 30.0,
        hideBlip = true,
    },
}
```

### Permissions

* Its required to add those permissions in your server.cfg.

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

### Other

{% hint style="info" %}
If you like to define your language, redirect to locales system guide.
{% endhint %}

{% content-ref url="/pages/TW8bnEl2eiFU71cz5Dsb" %}
[Locales system](/paid-resources/rcore_prison/v1/locales-system.md)
{% endcontent-ref %}

```lua
-- Location: rcore_prison/configs/config.lua

-- Framework

-- !!! IF YOU ARE USING QBCORE / ESX -> YOU DONT NEED TO TOUCH THIS !!!!
-- !!! IF YOU ARE USING QBCORE / ESX -> YOU DONT NEED TO TOUCH THIS !!!!
-- !!! IF YOU ARE USING QBCORE / ESX -> YOU DONT NEED TO TOUCH THIS !!!!

Framework = 1, --[ 0 OR NIL = None |  1 = ESX  | 2 = QBCore |  3 = Other ] Choose your framework
MySQL = nil,--[ 0  = 'oxmysql' |  1 = 'mysql-async'  | 2 = 'ghmattimysql' ] Choose your SQL

Notify = {
    DefaultNotify = false, -- Notify provided by rcore_prison
    event = 'rcore_prison:renderNotification' -- Retval: serverId, data
},

-- FRAMEWORK_TRIGGERS
-- !!! IF YOU ARE USING QBCORE / ESX -> YOU DONT NEED TO TOUCH THIS !!!!
-- !!! IF YOU ARE USING QBCORE / ESX -> YOU DONT NEED TO TOUCH THIS !!!!
-- !!! IF YOU ARE USING QBCORE / ESX -> YOU DONT NEED TO TOUCH THIS !!!!
-- !!! IF YOU ARE USING QBCORE / ESX -> YOU DONT NEED TO TOUCH THIS !!!!

FrameworkTriggers = {
    notify = '', -- ['esx', 'qbcore'] Set the notification event, if left blank, default will be used
    object = '', --['esx', 'qbcore'] Set the shared object event, if left blank, default will be used (deprecated for QBCore)
    playerUnloadedServer = '', -- ['esx', 'qbcore'] Set playerLogout (server-side) event, if left blank, automatic detection will be performed
    playerLoadedServer = '', -- ['esx', 'qbcore'] Set playerLoadedServer (server-side) event, automatic detection will be performed
    playerUnloadedClient = '', -- ['esx', 'qbcore'] Set playerUnloadedClient (client-side) event, automatic detection will be performed
    playerLoadedClient = '', -- ['esx', 'qbcore'] Set playerLoadedClient (client-side) event, automatic detection will be performed
    resourceName = '', -- ['esx', 'qbcore'] Set the resource name, if left blank, automatic detection will be performed
    resourceNameClothing = '', -- [ ESX = 'skinchanger' / QBCore = 'qb-clothing', 'fivem-appearance' ] Set the clothing resource name, if left blank, automatic detection will be performed
    resourceNamePhone = '', -- '[ 'qb-phone', 'npwd', 'gksphone', 'qs-smartphone'] Set the phone resource name for booth usage, if left blank, automatic detection will be performed
},

Presets = {
    -- Key: resourceName ['rcore_prison_map']
    -- Preset name: ['rcore'] | data/presets/<XX>

    Maps = {
        ['rcore_prison_map'] = 'rcore',
        ['prison_main'] = 'desertos',
        ['cfx-gabz-prison'] = 'gabz',
        ['int_prison'] = 'unclejust',
        ['molo_alcatraz'] = 'alcatraz',
    }
},

-- Defined phones that are automatically loaded, if you dont define any: qb-phone, npwd, gksphone, qs-smartphone

ScriptEvents = {
    ['qb-clothing'] = {
        loadPlayerClothing = 'qb-clothing:client:loadPlayerClothing',
        loadOutfit = 'qb-clothing:client:loadOutfit',
    }
},

Frontend = {
    AlignMenu = 'top-left', -- 'top-left', 'top-right'
    useLibrary = 'rcore', -- Select your preffered library for menus: 'ox_lib', 'qb-menu', 'es_extended', 'es_context', 'rcore'
    Libraries = {
        ['esx_context'] = true,
        ['es_extended'] = true,
        ['ox_lib'] = true,
        ['qb-menu'] = true,
    },
},

-- Related to phone booths
-- Note: This is listed of supported phones
-- For setting your phone & locales: check [rcore_prison/web/build/config.js]

ImportAPI = false,

SupportedPhones = {
    ['gksphone'] = true,
    ['qb-phone'] = true,
    ['qs-smartphone'] = true,
    ['npwd'] = true,
},

Dashboard = {
    AddSentence = {
        ShowNames = true -- Want to hide player names in Add Sentence - list (dashboard - panel)
    }
},

RenderNPCBlips = true, -- Do you want to show where are specific things in prison area (true/false)
RenderPrisonMap = true, -- Do you want to render prison yard and stuff? (true/fase)

ECONOMY_ITEM = 'cigar', -- Used along for Dealers around Prison yard or credits as payment thing.

BoothMaxCallLenght = 5 * 60 * 1000, -- Max call lenght for calll session.
BoothTakeCreditsPeriod = 60 * 1000, -- Each minute reduce prisoner credits (BoothPricePerMinute)
BoothPricePerMinute = 2, -- 2 Credits per BoothTakeCreditsPeriod

OutfitSkipSelection = false, -- Would you like to get Prisoner instantly in Prison and define own actions?
OutfitSelectionTimeout = 10 * 1000,  -- How much time prisoner have time for outfit selection.
PackageCooldown = 30 * 1000, -- For Ciggarets packaging minigame, delay between each package session

InteractionDist = 1.5, -- Used for cache system, when you are not using target interaction.

CheckDistTimeout = 5 * 1000, -- Timeout when user is jailed, to start CheckDist for clients if #Prisoners <= 0 | Dont touch this!!
CheckEscapeDist = 300.0, -- Escape check dist
CheckDist = true, -- Prisoners only (escape when far away)

Language = 'en', -- 'en', 'cs

Target = {
    CheckMenuDistInterval = 250, -- How many tick interval should check dist opened menu?
    CheckMenuDist = 1.5, -- Distance of when hiding of interaction menu should perform?
    CheckDist = 1.5,  -- Distance of showing options when performing target
},

Activities = {
    DRAW_LINE = {
        rgb = vec3(14, 227, 7),  -- Related to jobs, as help draw line
        opacity = 255 -- Opacity
    }
},
```

<table><thead><tr><th>Name</th><th>param</th><th>desc</th><th></th></tr></thead><tbody><tr><td><pre><code>OutfitSelectionTimeout
</code></pre></td><td></td><td></td><td></td></tr><tr><td></td><td><pre><code>10 * 1000
</code></pre></td><td></td><td></td></tr><tr><td></td><td>Define how much time the new Prisoner spent in outfit selection, if new prisoner is not selecting anything, warden is going to choose him random prison outfit.</td><td></td><td></td></tr><tr><td><pre><code>Language
</code></pre></td><td></td><td></td><td></td></tr><tr><td></td><td><pre><code>'en'
</code></pre></td><td></td><td></td></tr><tr><td></td><td>Here you can define your language.</td><td></td><td></td></tr><tr><td><pre><code>DefaultNotify
</code></pre></td><td></td><td></td><td></td></tr><tr><td></td><td><pre><code>true/false
</code></pre></td><td></td><td></td></tr><tr><td></td><td>Do you like to use native notifications or own?</td><td></td><td></td></tr><tr><td><pre><code>ReduceSentenceOffline
</code></pre></td><td></td><td></td><td></td></tr><tr><td></td><td><pre><code>true/false
</code></pre></td><td></td><td></td></tr><tr><td></td><td>True - Prisoners can be offline and jail time is reducing<br><br>False - Prisoner needs to be on server for reducing time.</td><td></td><td></td></tr><tr><td><pre><code>NotifyNewJobMember
</code></pre></td><td></td><td></td><td></td></tr><tr><td></td><td><pre><code>true/false
</code></pre></td><td></td><td></td></tr><tr><td></td><td>True - Notify job members when prisoner join activity on Prison yard.<br><br>False - To disable notify of new job member (activity)</td><td></td><td></td></tr></tbody></table>

#### Prison Yard

All related settings for yard area.

```
-- Location: rcore_prison/configs/config.lua ['Yard']
```

```
Yard = {
    AnnoucementState = true, -- Enable annoucement in Prison yard from Warden
    AnnoucementAlarmState = false, -- Enable / Disable annoucement of Alarm, when break-out in progress.
},
```

#### Inmates

All related settings for Inmates (tasks, trades etc)

```
-- Location: rcore_prison/configs/config.lua ['Inmates']
```

```
Inmates = {
    Stab = 2, -- How many prisoners needs to be online to allow this option.
},
```

#### Community service

Community service

```
-- Location: rcore_prison/configs/config.lua ['CS']
```

```
CS = {
    DisableGameControls = true, -- When doing community service task, disabled any interaction (handy for abuser with clearing anims and so on)
    DefaultPeroll = 5, -- 6 Hours, when there is no defined time for jailed user CSW (command)
    Place = vec3(236.464233, -409.489075, 47.924313), -- Place of NPC where CS user is reporting him self and taking tasks.

    CleaningAnimTime = 0.1 * 1000,
    ReducePeroll = 1, -- 1 peroll from CS sentence, after finished current CS task
    PoolCooldown = 5 * 60 * 1000, -- When user finished specific zone, when should be added back to zone select pool?

    OUTLINE = {
        color = vec3(255, 255, 255), -- Color of outline on entity
        opacity = 80 -- Opacity of outline.
    }
}
```

#### NPC

NPC configuration

```
-- Location: rcore_prison/configs/config.lua ['NPC']
```

```
NPC = {
    SpawnNPC = false, -- Handle spawning of guards running arround Prisoners 
    HandleNPCPoolState = true, -- Disable spawning on NPC from scenario!
},
```

#### Circuit minigame

Circuit configuration

```
-- Location: rcore_prison/configs/config.lua ['Circuit']
```

```
Circuit = {
    Lifes = 3, -- How much lifes person has for Electrician
    Difficulty = 1, -- 1, 2, 3, 4, 5, 6 --> This is ignored when EachJobLevelIncreaseDifficulty is enabled

    EachJobLevelIncreaseDifficulty = true, -- If enabled, when doing Electrician each tasks gets harder 1, 2, 3, 4, 5, 6

    Keybinds = {
        ['ARROW_UP'] = 172,
        ['ARROW_DOWN'] = 173,
        ['LEFT_ARROW'] = 174,
        ['RIGHT_ARROW'] = 175,
        ['BACKSPACE'] = 177,
    }
}
```

#### Canteen

Prison canteen settings

```
Canteen  = {
    FreeFood = true,
    TakeFoodTimeout = 5 * 60 * 1000,

    PackageItems = {
        {
            itemName = 'water',
            count = 2,
        },
        {
            itemName = 'burger',
            count = 3,
        }
    }
}
```

#### Gym

Gym

```
-- Location: rcore_prison/configs/config.lua ['Gym']
```

```
Gym = {
    ['Cranks'] = {
        action = {
            percentIncrease = 2,
            time = 4,
        },
        skills = {
            strength = 0.3,
            stamina = 0.1,  
        }
    },

    ['Situps'] = {
        action = {
            percentIncrease = 8,
            time = 1,
        },
        skills = {
            strength = 0.3,
            stamina = 0.1,  
        }
    },

    ['Musclechin'] = {
        action = {
            percentIncrease = 2,
            time = 4,
        },
        skills = {
            strength = 0.3,
            stamina = 0.1,  
        }
    },
},
```

#### Target

Target

```
-- Location: rcore_prison/configs/config.lua ['Target']
```

```
Target = {
    CheckMenuDistInterval = 250, -- How many tick interval should check dist opened menu?
    CheckMenuDist = 1.5, -- Distance of when hiding of interaction menu should perform?
    CheckDist = 1.0,  -- Distance of showing options when performing target
},
```

#### Activities

Activities

```
-- Location: rcore_prison/configs/config.lua ['Activities']
```

```
Activities = {
    DRAW_LINE = {
        rgb = vec3(14, 227, 7),  -- Related to jobs, as help draw line
        opacity = 255 -- Opacity
    }
},
```

#### Minigame

Package of Cigarrets

```
-- Location: rcore_prison/configs/config.lua ['Minigame']
```

```
Minigame = {
    Steps = 5,
    MoveStep = 0.09, -- Needs to be higher > 0.02
    Tolerance = 0.025,
    TimeAcc = 0.2,
},
```

| Option    | Param   | Description                                  |
| --------- | ------- | -------------------------------------------- |
| Steps     | integer | How many blocks script is going to generate? |
| MoveStep  | float   | Speed of arrowKeys generation block          |
| Tolerance | float   | What tolenrace should script ignore?         |
| TimeAcc   | float   | Calc behind keyPress minigame                |

#### Commands

```
-- Location: rcore_prison/configs/config.lua ['Commands']
```

<table><thead><tr><th>Option</th><th>Param</th><th>Usage</th><th>Command desc</th></tr></thead><tbody><tr><td><pre><code>state
</code></pre></td><td></td><td></td><td></td></tr><tr><td></td><td><pre><code>true/false
</code></pre></td><td></td><td></td></tr><tr><td></td><td>Do you want to allow usage of jail commands?</td><td>Enable/Disable state of command usage.</td><td></td></tr><tr><td><pre><code>jail
</code></pre></td><td></td><td></td><td></td></tr><tr><td></td><td><pre><code>"jail"
</code></pre></td><td></td><td></td></tr><tr><td></td><td>Registered jail command as jail by default</td><td>/jail serverId 10</td><td></td></tr><tr><td><pre><code>unjail
</code></pre></td><td></td><td></td><td></td></tr><tr><td></td><td><pre><code>"unjail"
</code></pre></td><td></td><td></td></tr><tr><td></td><td>Registered unjail command as unjail by default</td><td>/unjail serverId</td><td></td></tr><tr><td><pre><code>dashboard
</code></pre></td><td></td><td></td><td></td></tr><tr><td></td><td><pre><code>"dashboard"
</code></pre></td><td></td><td></td></tr><tr><td></td><td>Registered dashboard command as dashboard by default, usage for opening dashboard app.</td><td>/dashboard</td><td></td></tr><tr><td><pre><code>startcs
</code></pre></td><td></td><td></td><td></td></tr><tr><td></td><td><pre><code>"startcs"
</code></pre></td><td></td><td></td></tr><tr><td></td><td>Do you want to sent somebody for community service</td><td>/startcs serverId 30</td><td></td></tr></tbody></table>

### Jobs

```
-- Location: rcore_prison/configs/config.lua ['Jobs']
```

There is option to define your jobs, restriction for commands.

<table><thead><tr><th>Job name</th><th>state</th><th></th></tr></thead><tbody><tr><td><pre><code>police
</code></pre></td><td></td><td></td></tr><tr><td></td><td><pre><code>true/false
</code></pre></td><td></td></tr><tr><td></td><td>Define your server job name, which will be able to perform jail commands.</td><td></td></tr></tbody></table>

### Accounts

```lua
-- Location: rcore_prison/configs/config.lua ['Accounts']
```

There are options for Prisoner accouns, which you can define:

<table><thead><tr><th>Option</th><th>state</th><th>Desc</th></tr></thead><tbody><tr><td><pre><code>CreditsItem
</code></pre></td><td></td><td></td></tr><tr><td></td><td><pre><code>'money'
</code></pre></td><td></td></tr><tr><td></td><td>Item which is used as internal economy inside prison (itemName).</td><td></td></tr><tr><td><pre><code>DEFAULT_BALANCE
</code></pre></td><td></td><td></td></tr><tr><td></td><td><pre><code>true/false
</code></pre></td><td></td></tr><tr><td></td><td>Default starting balance for Prisoner account, when created.</td><td></td></tr><tr><td><pre><code>GiftState
</code></pre></td><td></td><td></td></tr><tr><td></td><td><pre><code>true/false
</code></pre></td><td></td></tr><tr><td></td><td>When Prisoner is jailed, and has created prisoner account, can outside people sent prisoner gifts?</td><td></td></tr><tr><td><pre><code>FriendListLimit
</code></pre></td><td></td><td></td></tr><tr><td></td><td><pre><code>number
</code></pre></td><td></td></tr><tr><td></td><td>How many friend can prisoner have added?</td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

### Release

```
-- Location: rcore_prison/configs/config.lua ['Release']
```

There are options for prisoner release, which you can define.

<table><thead><tr><th>Option</th><th>state</th><th>Desc</th></tr></thead><tbody><tr><td><pre><code>SaveAndReturnItems
</code></pre></td><td></td><td></td></tr><tr><td></td><td><pre><code>true/false
</code></pre></td><td></td></tr><tr><td></td><td>Stash prisoner items &#x26; return</td><td></td></tr><tr><td><pre><code>TransferCreditsFromAccount
</code></pre></td><td></td><td></td></tr><tr><td></td><td><pre><code>true/false
</code></pre></td><td></td></tr><tr><td></td><td>Transfer prisoner credits to money, when Prisoner released from jaill</td><td></td></tr></tbody></table>

### KeepItems

```lua
-- Location: rcore_prison/configs/config.lua ['KeepItems']
```

You define specific iems, which prisoners can bring inside Prison.

| Item name  | state |
| ---------- | ----- |
| \['water'] | true  |

#### Usage:

```lua
-- Location: rcore_prison/configs/config.lua ['KeepItems']
-- All of these items, can user bring inside jail / outside.
-- Note: Its recommended to define canteen items, so prisoners can get them.

KeepItems = {
    ['water'] = true,
    ['sprunk'] = true,
    ['coffee'] = true,
    ['ecola'] = true,
    ['ecola_light'] = true,
    ['sludgie'] = true
},
```

### Level

You can define level debug, very useful when you want to see whats happening in background.

<pre class="language-lua"><code class="lang-lua">-- Location: rcore_prison/configs/config.lua ['Levele']

<strong>Level = {
</strong>   Debug = 3 -- Level [1, 2, 3]
},
</code></pre>


---

# 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_prison/v1/config.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.
