> For the complete documentation index, see [llms.txt](https://horizon-scripts.gitbook.io/horizon-scripts-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://horizon-scripts.gitbook.io/horizon-scripts-docs/horizonmdt/configuration.md). Agents can also search and read this documentation through its [MCP server](https://horizon-scripts.gitbook.io/horizon-scripts-docs/~gitbook/mcp).

# Configuration

Edit `shared/config.lua` for normal server setup. It is loaded after `shared/advanced.lua`, so its values take precedence. Restart HorizonMDT after changing Lua files. The advanced file contains camera measurements, animation placement, database column mappings, default department catalogs, and legacy provider settings. Change it only when your server needs those details.

## Framework and language

| Setting            | What to set                                                                                                                      |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| `Config.Framework` | `esx`, `qbcore`, `qbox`, or `auto`. The delivered development config selects `esx`; change it to the framework your server runs. |
| `Config.Locale`    | Default language for the tablet and server messages. Use one of the codes below.                                                 |
| `Config.Debug`     | Enable temporary HorizonMDT debug logs while diagnosing a problem; leave `false` during normal use.                              |

The 22 player languages are: `ar` Arabic, `cs` Czech, `da` Danish, `de` German, `en` English, `es` Spanish, `fr` French, `hu` Hungarian, `it` Italian, `ja` Japanese, `nl` Dutch, `no` Norwegian, `pl` Polish, `pt-br` Brazilian Portuguese, `pt-pt` European Portuguese, `ro` Romanian, `ru` Russian, `sv` Swedish, `th` Thai, `tr` Turkish, `uk` Ukrainian, and `zh-cn` Simplified Chinese. The repository also contains `zz`, a test catalog; it is not a player language.

For example, `Config.Locale = 'pt-br'` selects Brazilian Portuguese. UI translation source files are in `web/src/locales/`; runtime bundles are in `web/dist/locales/`. Server messages are in `locales/`. If you edit catalogs, keep the keys aligned and run `node tools/check_ui_locales.js` before distributing the resource. Law article translations are separate from the UI and live in the law catalogs.

## External resources

| Setting                     | What it does                                                                                                                                             | Next edit                                                                                     |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `Config.HudResource`        | Exact folder name of a HUD that should hide while the tablet is open. Empty disables the integration.                                                    | Put its client hide/show export calls in `bridge/client.lua`.                                 |
| `Config.NotifyResource`     | Exact folder name of a client notification resource. Empty uses HorizonMDT's configured notification provider.                                           | Adapt the one `Bridge.Client.Notify` export call in `bridge/client.lua`.                      |
| `Config.InventoryResource`  | Exact folder name of a server inventory resource for tablet item counts. Empty uses automatic built-in detection.                                        | Adapt `Bridge.Server.GetInventoryCount` in `bridge/server.lua`.                               |
| `Config.DispatchBridgeMode` | `off` uses internal dispatch, `mirror` also sends external alerts, `replace` tries the external dispatch and falls back if it does not accept the alert. | Implement `Bridge.Server.SendDispatchAlert` in `bridge/server.lua` for `mirror` or `replace`. |

Use the export names and argument order documented by the resource you installed. [Custom bridges](https://horizon-scripts.gitbook.io/horizon-scripts-docs/horizonmdt/custom-bridges.md) has copyable examples and return contracts. Built-in ESX, QB-Core, Qbox, and known inventory support needs no bridge edit.

## Tablet access

| Setting                     | Meaning                                                                                                                  |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `Config.TabletUse.UseItem`  | Registers tablet item use when `true`. Set `false` for command-only use or when another resource owns item registration. |
| `AccessMode`                | `item`, `command`, or `both`: which opening methods HorizonMDT allows.                                                   |
| `RequireItem`               | Requires the item even when opening with a command or keybind. This is independent of `UseItem`.                         |
| `ItemName`                  | Inventory item name, `tablet` by default. Match the installed item definition.                                           |
| `ItemRegistration`          | `framework` or `ox_inventory`: who registers usable-item callbacks.                                                      |
| `OpenCommand`               | General chat command without the leading slash.                                                                          |
| `DepartmentCommands`        | Optional per-department commands. The default gives EMS `/mdtems` and the other departments `/mdt`.                      |
| `AllowedJobs`               | Job names and minimum numeric grades allowed to open the tablet. `ems` maps to the ambulance department by default.      |
| `OpenKeybind` and `OpenKey` | Enable and choose the optional opening key. Item, job, grade, and duty checks still apply.                               |

For example, a command-only server that does not require an item can use:

```lua
Config.TabletUse.UseItem = false
Config.TabletUse.AccessMode = 'command'
Config.TabletUse.RequireItem = false
```

`Config.AllowedJobs` is synchronized with the tablet allowlist. Advanced department management and radio grade limits are separate policies in `shared/advanced.lua` and tablet Administration.

## Feature switches

| Setting                                                      | Meaning                                                                                                                                       |
| ------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `HiringAnimation`                                            | Show the shared hire contract and division ceremony; `false` completes hiring immediately.                                                    |
| `Radio.Enabled`, `Radio.VoiceResource`                       | Enable tablet radio and name the voice resource; default is `pma-voice`. Channel definitions and PTT details are advanced settings.           |
| `Mugshot.Enabled`, `Mugshot.SubjectOnly`                     | Enable photos; `SubjectOnly = true` frames the citizen at a photo point without the old staged walk and camera positions. See below.          |
| `BiometricScanner.Enabled`                                   | Enable the built-in BlueCheck-style scanner. Its command and distance are advanced settings.                                                  |
| `Bodycam.Enabled`, `Bodycam.WardrobeResource`                | Enable the optional uniform check and name its wardrobe resource.                                                                             |
| `DashInstall.Enabled`                                        | Enable the vehicle CAD/laptop module. Vehicle and item details are advanced settings.                                                         |
| `PoliceAlerts.Enabled`, `PoliceAlerts.ShotDetection.Enabled` | Enable police alerts and the gunfire detector independently. Thresholds and blip appearance are advanced settings.                            |
| `MedicalAlerts.Enabled`                                      | Enable EMS injury alerts.                                                                                                                     |
| `IllegalEvidence.Enabled`, `IllegalEvidence.ImageResource`   | Enable evidence checks and optionally provide the inventory image resource. Item catalogs and exclusions are advanced settings.               |
| `Laws.Enabled`                                               | Enable the law catalog. Law limits and labels are advanced settings.                                                                          |
| `Fines.Enabled`, `FineBilling.Provider`                      | Enable fines and choose `internal` or an advanced external billing provider.                                                                  |
| `MedicalBilling.Enabled`, `MedicalBilling.Provider`          | Enable EMS service invoices and choose `internal` or an advanced external provider. Service prices are server-owned in `shared/advanced.lua`. |
| `Prison.Enabled`                                             | Enable the prison workflow. Spawns, outfit fallback, and item removal policy are advanced settings.                                           |
| `OfficerPromotion.Enabled`                                   | Enable the optional promotion vehicle choice.                                                                                                 |
| `TaserEffect.Enabled`                                        | Enable the optional stun effect. Timing is an advanced setting.                                                                               |

## Photo points and mugshots

There are two photo kinds: **citizen photo points** for mugshots and **faction/officer photo points** for staff portraits. The default `Config.Mugshot.MugshotSuspectPoint` is a fallback citizen point. With `OfficerPhotoMode = 'fixed'`, `Config.Mugshot.OfficerPhotoPoint` is a fallback staff point. With `OfficerPhotoMode = 'anywhere'`, officers can be photographed at their current position. Set a fallback in `shared/config.lua` only if you want a fixed location in Lua:

```lua
Config.Mugshot.MugshotSuspectPoint = vector4(-1096.2, -823.9, 13.2, 90.0)
Config.Mugshot.OfficerPhotoMode = 'fixed'
Config.Mugshot.OfficerPhotoPoint = vector4(-1095.1, -825.1, 13.2, 270.0)
```

For **multiple points**, use **Settings → Administration → Points → Photo points** in the tablet. Choose the faction, add a faction photo point or citizen photo point, and save its coordinates or place it in the world. Repeat for every station. These points are saved in `data/tablet_admin.json`; a writable resource folder is required. The server selects the nearest configured point for the relevant person. Police, Sheriff, and FIB can configure citizen and officer points. EMS Administration currently permits officer points only.

The tablet-managed primary point and additional points can coexist with the Lua fallback. In `SubjectOnly` mode, citizen capture uses the subject position and camera framing; the old walk-in, camera-entry, and camera-focus values in `shared/advanced.lua` apply only to the staged mode. MugShotBase64 and `screenshot-basic` are the default capture resources. Persistent image URLs require the server-only `horizon_mdt_fivemanage_api_key` convar in `server.cfg`; keep the key out of shared Lua files.

## What remains in advanced.lua

`shared/advanced.lua` stays editable for unusual servers. It contains identity and database mappings; notification and audio provider fallbacks; camera, prop, and animation calibration; law and billing details; department badges, ranks, and divisions; radio channels; prison outfits; and marker appearance. Some historical Spanish rank and division values remain there because saved records and channel access can refer to those exact names. Change those alongside your existing job and MDT data.
