# Configuration

## Debug

If you have any issue with our script, set `Debug = true` in configuration file (`[rcore_doorlock]/rcore_doorlock/config.lua`) to see additional informations in client console *(F8)* and server console. Screenshots will help our support to solve faster and better your problem in ticket.

## Bridge

All bridge resources should be auto detectable without editing config. If there is any unexpectable issue in console with bridge, go to `[rcore_doorlock]/rcore_doorlock/config.lua` and edit bridge properties by your server specifications.

```lua
Framework = Framework.AUTO_DETECT, -- [ESX - es_extended, QBCore - qb-core, QBX = qbx_core, Standalone - standalone]
Inventory = Inventory.AUTO_DETECT, -- [OX - ox_inventory, QB - qb-inventory, QS - qs-inventory, MF - mf-inventory, PS - ps-inventory, LJ - lj-inventory, CORE - core_inventory, CHEZZA - inventory, CODEM -codem-inventory, ORIGEN - origen_inventory, TGIANN - tgiann-inventory, AK47 = ak47_inventory, AK47_QB = ak47_qb_inventory, NONE = none]
Database = Database.AUTO_DETECT,   -- [OX - ox_mysql, MYSQL_ASYNC - mysql-async, GHMATTI - ghmattimysql]
Target = Target.AUTO_DETECT,       -- [NONE - standalone, OX - ox_target, QB - qb-target, QTARGET - qtarget]
Society = Society.AUTO_DETECT,     -- [ESX - es_extended, QBCore - qb-core, FD_BANKING = fd_banking, RENEWED_BANKING = Renewed-Banking, CRM_BANKING = crm-banking]
Gangs = Gangs.AUTO_DETECT,         -- [QBCore - qb-core, QBX = qbx_core, RCORE - rcore_gangs, BRUTAL - brutal_gangs]
Dispatch = Dispatch.AUTO_DETECT,   -- [NONE = standalone, CODESIGN - cd_dispatch, CODEM - codem-dispatch, CORE - core_dispatch, DUSA - dusa_dispatch, EMERGENCY - emergencydispatch, ORIGEN - origen_police, QUASAR -qs-dispatch, RCORE - rcore_dispatch, TK - tk_dispatch, LB = lb-tablet]
```

{% hint style="danger" %}
**Standalone (None) Bridge** If you want to make your own integration, you can implement your own API methods in `[rcore_doorlock]/rcore_doorlock/server/modules/bridge/<bridge>/sv-standalone.lua` .

There is **no** option to have few **features** without having one of the bridge resources on your server. You are going to **loose those features**:

* Anything job related
  * Players won't be able to open doors with jobs
  * Locksmith jobs won't work properly
* Anything money related
  * Locksmith crafting will be free
    {% endhint %}

## Locales

You can choose one of our translations in `[rcore_doorlock]/rcore_doorlock/locales` or translate english one by yourself. Every single text is located in there.

```lua
Locale = 'en',
```

## Admin groups

Defines the admin groups for each framework. Admins in these groups can use commands like /doors and /doorsadmin.

```lua
FrameworkAdminGroups = {
    [Framework.ESX] = { 'superadmin', 'admin' },
    [Framework.QBCore] = { 'god', 'admin' },
},
```

## Presets

File of preset to load on script initialization. Each preset file can be loaded only once and you won't be able to load it again after ensuring script.

Presets contains preconfigured doors for base GTA 5 maps, custom maps or any community presets.

## UsableInventoryItems

This setting allows the use of item in inventory, such as keys or cards, to interact with doors. If set to false, these items will not be usable when pressing use in your inventory.

```lua
UsableInventoryItems = true,
```

## Commands

Defines the commands for doors UI and toggling admin mode.

```lua
Commands = {
    Doors = 'doors',
    AdminMode = 'doorsadmin',
},
```

## DrawText

Enables or disables the display of text when interacting with doors.

```lua
DrawText = {
    Enabled = true,
    Font = 4,
},
```

## Cooldown

Sets the cooldown time (in milliseconds) between interactions.

```lua
Cooldown = 500,
```

## Keybind

Defines the key used to interact with doors. Default is 'e' on the keyboard.

```lua
Keybind = {
    Enabled = true,
    Mapper = 'keyboard',
    Key = 'e',
},
```

## Target

Sets the target interaction distance and icon for door interaction.

```lua
Target = {
    Distance = 1.5,
    Icon = 'fa-solid fa-lock',
},
```

## Items

Defines the items used to open doors, such as keys and access cards, along with the animations.

```lua
Items = {
    Key = {
        Item = 'door_key',
        Animation = {
            Dict = 'mp_common',
            Name = 'givetake1_a',
            Duration = 1000,
            PlayAlways = true,
        },
    },
    Card = {
        Item = 'door_card',
    },
},
```

## CardReader

Defines the configuration for card readers, including models, animations, interaction distances, and visual feedback textures.

```lua
CardReader = {
    Card = {
        Model = 'rcore_doorlock_card_animated',
        Animation = {
            Dict = 'clip@rcore_doorlock_card_animated',
            Name = 'rcore_doorlock_card_animated',
        },
    },
    Reader = {
        Model = 'rcore_keycard_control',
        Offset = vector3(0.04, 0.0, 0.0),
        Card = {
            Target = {
                Distance = 5.5,
                Icon = 'fa-regular fa-address-card',
            },
        },
        PinCode = {
            Target = {
                Distance = 5.5,
                Icon = 'fa-solid fa-keyboard',
            },
        },
        MaxDistanceDoor = 5.5,
        Textures = {
            Default = 0,
            Success = 1,
            Error = 2,
        },
    },
},
```

## Lockpicking

Configures the lockpicking system, including required items, minigame settings, and alert chances for the police.

```lua
Lockpicking = {
    Enabled = true,
    Item = 'lockpick',
    RemoveOnTry = true,
    Target = {
        Icon = 'fas fa-screwdriver',
        Distance = 2.5,
    },
    Minigame = {
        Speed = 4,
        Lives = 3,
        Keys = {
            { 'E', 'KeyE' },
            { 'R', 'KeyR' },
            { 'T', 'KeyT' },
            { 'D', 'KeyD' },
            { 'F', 'KeyF' },
            { 'G', 'KeyG' },
        },
        MaxFails = 4,
        NeededPicks = 3,
    },
    Alert = {
        Enabled = true,
        Chance = {
            Enabled = true,
            Min = 1,
            Max = 100,
        },
        Jobs = { 'police' },
    },
    RequiredCops = {
        Jobs = { 'police', 'sheriff' },
        Minimum = 1
    },
},
```

## Hacking

Defines the hacking system configuration, including the minigame, item required, and alert chance for police intervention.

```lua
Hacking = {
    Enabled = true,
    Item = 'hacking_device',
    RemoveOnTry = true,
    Target = {
        Icon = 'fas fa-laptop-code',
        Distance = 2.5,
    },
    DistanceInteraction = 2.5,
    Minigame = {
        Levels = {
            {
                lives = 3,
                difficulty = 1, -- [1 - 6]
            },
        },
    },
    Alert = {
        Enabled = true,
        Chance = {
            Enabled = true,
            Min = 1,
            Max = 100,
        },
        Jobs = { 'police' },
    },
    RequiredCops = {
            Jobs = { 'police', 'sheriff' },
            Minimum = 0
    },
    Animation = {
        Dict = 'amb@code_human_wander_texting_fat@male@base',
        Anim = 'static',
        PhoneModel = `prop_phone_cs_frank`
    }
},
```


---

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