# Configuration

## Configuration

All settings are managed through `config.lua`.

***

### Framework

```
Config.Framework = 'auto'  -- 'auto', 'qb', or 'esx'
Config.UseTestMode = false -- true = test without DB

- auto — Automatically detects QBCore or ESX
- qb — Force QBCore
- esx — Force ESX
```

***

### MDT Access

```
Config.OpenCommand = 'mdt'    -- Chat command to open MDT
Config.OpenKey = 'F5'         -- Keybind to open/close MDT
Config.RequiredItem = nil     -- nil = no item needed, 'tablet_mdt' = requires item
```

***

### Language

```
Config.Language = 'en'

Available languages:
- tr — Türkçe
- en — English
- de — Deutsch
- fr — Français
- es — Español
- pt — Português
```

***

### Allowed Jobs

```

Config.AllowedJobs = {
    ['police']  = true,
    ['sheriff'] = true,
}
```

Add or remove jobs as needed.

***

### Punishment System

```
Config.Punishment = {
    MoneySource = 'bank',         -- 'bank' or 'cash'
    JailSystem = 'auto',          -- see supported systems below
    CustomJailEvent = '',         -- custom event name
    CustomJailIsServer = true,    -- true = server event, false = client
    JailTimeMultiplier = 1,       -- multiplier for jail/community service time
    NotifyPlayer = true,          -- notify the punished player
    NotifyOfficer = true,         -- notify the officer
}
```

Supported Jail/Community Service Systems:

| System                | Config Value            |
| --------------------- | ----------------------- |
| Auto Detect           | 'auto'                  |
| QB Community Service  | 'qb-communityservice'   |
| QB Prison             | 'qb-prison'             |
| ESX Community Service | 'esx\_communityservice' |
| ESX Jail              | 'esx\_jail'             |
| Wasabi Jail           | 'wasabi\_jail'          |
| Rcore Prison          | 'rcore\_prison'         |
| myPrison              | 'myPrison'              |
| Renewed Jail          | 'renewed-jail'          |
| TK Jail               | 'tk\_jail'              |
| Qalle Jail            | 'qalle\_jail'           |
| Custom Event          | 'custom'                |

***

### Discord Webhooks

```
Config.Webhooks = {
    reports  = '',  -- Discord webhook URL for reports
    warrants = '',  -- Discord webhook URL for warrants
    color    = 3447003,
}
```

***

### Chat Settings

```
Config.Chat = {
    MaxHistory = 50,    -- Maximum stored messages
    MaxLength  = 500,   -- Maximum message length
    SaveToDb   = true,  -- Save chat to database
}
```

***

### Map Settings

```
Config.Map = {
    UpdateInterval = 2000,  -- Map refresh rate (ms)
    ShowHealth     = true,  -- Show officer health
    ShowNames      = true,  -- Show officer names
}
```

***

### UI Settings

```
Config.UI = {
    TabletTitle = '',     -- Text shown on status bar (empty = hidden)
    MaxReports  = 100,    -- Maximum reports loaded
    MaxWarrants = 100,    -- Maximum warrants loaded
}
```

***

### Evidence Settings

```
Config.Evidence = {
    MaxPhotos = 5,  -- Maximum evidence images per report
}
```


---

# 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://elena-scripts.gitbook.io/elenascripts/core-systems/mdt-v2.0/configuration.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.
