> For the complete documentation index, see [llms.txt](https://wiki.qfdevelopers.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.qfdevelopers.com/scripts/editor-22/configuration.md).

# Configuration

## Languages

The language of the tablet is set inside `Config.NUI`.

* `en-US`: English
* `fr-FR`: French
* `pl-PL`: Polish
* `de-DE`: German
* `es-ES`: Spanish
* `pt-PT`: Portuguese
* `ja-JP`: Japanese
* `it-IT`: Italian
* `ko-KR`: Korean

```lua
Config.NUI = {
    defaultLangCode = "en-US",
    -- Languages offered in the tablet's own language switcher.
    langs = {
        { code = "en-US", name = "English", iconUrl = "https://.../gb.webp" },
        { code = "pl-PL", name = "Polski",  iconUrl = "https://.../pl.webp" },
    }
}
```

### Commands & Keybinds

**General**

* `/qf_mdt_mechanic_v2` (DELETE): Toggle the MDT Dashboard.
* `/qf_mdt_mechanic_v2badge` (B): Show/Hide Employee Badge. `/badge` works as a short alias.
* `/bodycam`: Toggle the bodycam overlay. `/showbodycam` and `/hidebodycam` force one state.

**Dispatch**

* `/qf_mdt_mechanic_v2_fastgps` (E): Set the GPS to the latest dispatch alert.
* `/qf_mdt_mechanic_v2_dispatch` (HOME): Open the MDT straight on the dispatch page.

**Camera Mode**

* `/qf_mdt_mechanic_v2_capturephoto` (ENTER): Start capturing a photo.
* `/qf_mdt_mechanic_v2_blocknuifocus` (L-ALT): Block the NUI focus.
* `/qf_mdt_mechanic_v2_cameratakephoto` (SPACE): Take the photo.
* `/qf_mdt_mechanic_v2_cameratogglefocus` (L-ALT): Toggle mouse focus.
* `/qf_mdt_mechanic_v2_cameratoggleflashlight` (F): Toggle camera flashlight.
* `/qf_mdt_mechanic_v2_cameratoggleside` (R): Switch between Front/Back camera.

{% hint style="info" %} <mark style="color:$info;">Note: Both the keys and the command names come from</mark> <mark style="color:$info;">`Config.ToggleMDT`</mark><mark style="color:$info;">,</mark> <mark style="color:$info;"></mark><mark style="color:$info;">`Config.Camera`</mark><mark style="color:$info;">,</mark> <mark style="color:$info;"></mark><mark style="color:$info;">`Config.Badge`</mark> <mark style="color:$info;">and</mark> <mark style="color:$info;">`Config.Dispatch`</mark> <mark style="color:$info;">in</mark> <mark style="color:$info;">`config/config.lua`</mark> <mark style="color:$info;">— the names above are the defaults.</mark>
{% endhint %}

***

## Job & Ranks

`Config.Jobs` decides which framework job may open the tablet, and `Config.Grades` supplies the rank labels shown inside it. The `id` values **must** match the grade integers in your framework.

```lua
Config.Jobs = { ['mechanic'] = true }

Config.Grades = {
    { id = 0, name = "Recruit" },
    { id = 1, name = "Novice" },
    { id = 2, name = "Experienced" },
    { id = 3, name = "Leader" },
    { id = 4, name = "Boss" }
}

Config.Officers = {
    fireJob = "unemployed", -- job given to a fired employee
    fireGrade = 0,
    KickFromDutyJob = {     -- optional off-duty job
        enabled = false,
        name = "offmechanic"
    }
}
```

## Society & Billing

```lua
Config.Society = {
    name = "society_mechanic",
    jobname = "mechanic",
    label = "LSC",
    percentToBoss = 0.80,   -- share of an invoice that goes to the company
    percentToWorker = 0.20, -- share that goes to the employee who issued it
}
```

`Config.Billings` and `Config.Banks` are long lists of supported third-party billing and banking resources — set exactly one entry in each to `true` to bridge invoices and society money into the resource you already run. Leave everything `false` to use the framework's own society account.

## Service Price List

`Config.FineList` drives the price list used when issuing an invoice. The categories and their items are entirely yours to change.

```lua
Config.FineList = {
    {
        id = "1",
        label = "Repair & Maintenance Services",
        items = {
            { id = "1", label = "Standard Repair",      fine = 6000 },
            { id = "2", label = "Engine Overhaul",      fine = 6500 },
            { id = "3", label = "Bodywork & Painting",  fine = 5000 },
        }
    }
}
```

`Config.BillingLimits` caps how much a single invoice may be worth, per grade.

## Repair Jobs (`Config.Tasks`)

The tablet generates repair jobs around the map that employees can accept from the Tasks page. A job spawns a client vehicle with a specific fault, and the employee has to carry out the steps on the right part of the car.

```lua
Config.Tasks = {
    UseProgressBar = true,
    ManagementGrade = 3,        -- grade required to manage jobs
    RefreshInterval = 10,       -- minutes between job refreshes
    MaxAvailableJobs = 4,       -- jobs offered at the same time
    JobsGeneratedPerRefresh = { min = 1, max = 3 },
    VehicleDeleteDelay = 30000, -- ms before an abandoned job vehicle despawns

    EnableClientPeds = true,    -- spawn the waiting client next to the vehicle
    CustomTowScript = {
        jo_towtruck = true,     -- hand recovery jobs over to jo_towtruck
    },

    PaymentAccount = 'bank',    -- where the payout lands

    VehicleTypes = {
        mechanic = { 'towtruck', 'towtruck2' },
        tow      = { 'flatbed', 'flatbed2', 'flatbed3' },
        service  = { 'towtruck', 'towtruck2' },
    },

    DeliveryLocations = {
        workshop_ls = { name = "LS Customs", coords = vector3(-370.6018, -108.1824, 38.6807), heading = 162.9936 },
    },

    Clients = { "Michael Thompson", "David Garcia", "Sarah Jenkins" },

    Locations = {
        { name = "Cypress Flats", coords = vector3(725.2015, -2033.3895, 29.2840), heading = 354.6791 },
    },
}
```

### Adding your own fault type

Every entry in `Config.Tasks.IssueTypes` describes what is broken on the vehicle and the steps needed to fix it. `targetBone` decides where the employee has to stand, and `action` decides what the step actually repairs.

```lua
Config.Tasks.IssueTypes = {
    ["Engine overheating"] = {
        damage = { engineHealth = 200.0, popTires = false },
        effects = {},
        steps = {
            { targetBone = "engine", labelKey = "tasksOpenHood",     action = "open_hood",     duration = 2000 },
            { targetBone = "engine", labelKey = "tasksRepairEngine", action = "repair_engine", duration = 10000,
              animDict = "mini@repair", animName = "fixing_a_ped" },
            { targetBone = "engine", labelKey = "tasksCloseHood",    action = "close_hood",    duration = 2000 }
        }
    },
    ["Flat tire"] = {
        damage = { engineHealth = 1000.0, popTires = true, tiresToPop = { 0, 1 } },
        effects = {},
        steps = {
            { targetBone = "wheel_lf", labelKey = "tasksInspectTire", action = "inspect",     duration = 3000 },
            { targetBone = "wheel_lf", labelKey = "tasksReplaceTire", action = "repair_tire", duration = 8000 }
        }
    },
}
```

`labelKey` is a translation key — add it to `config/translations/*.lua` if you introduce a new one, otherwise the raw key is displayed.

## Dispatch

```lua
Config.Dispatch = {
    IgnoredJobs = { ... },      -- jobs whose alerts the tablet ignores
    Units = { ... },            -- unit callsigns available to employees
    ShowOnScreenAlerts = true,  -- set false if an external dispatch already draws alerts

    Integration = {
        rcore_dispatch = false,
        core_dispatch = false,
        opto_dispatch = false,
        tk_dispatch = false,
        _0r_dispatch = false,
        frkn_police_dispatch = false,
    },

    DeduplicationDistance = 20.0,
    AlertHistoryDuration = 600000, -- ms an alert stays in the history and on the map
}
```

## Interface

```lua
Config.NUI = {
    fractionName = "LSC",
    fractionFullName = "Los Santos Customs",
    title = "MDT LSC",
    primaryColor = ParseRGB({ 231, 149, 74 }),
    showLicenses = true,
    enableRadar = true,
    enableBodycam = true,
    enableBadge = true,

    -- Every page can be hidden by setting show = false
    sidebarPages = {
        home    = { icon = "fa-house",  show = true },
        tasks   = { icon = "fa-wrench", show = true },
        map     = { icon = "fa-map",    show = true },
        -- ...
    },
}
```

Other useful options:

| Option                             | Description                                                                |
| ---------------------------------- | -------------------------------------------------------------------------- |
| `Config.UseFrameworkNotifications` | Route notifications through your framework instead of the built-in ones.   |
| `Config.Mugshot`                   | `autoTake` and `uploadType` (`localfiles` or `fivemanage`).                |
| `Config.CitizenLicenses`           | Which licenses employees may view, grant and revoke, and from which grade. |
| `Config.Vehicles` / `Config.Map`   | Workshop locations and the vehicle classes tracked on the live map.        |
| `Config.UsableItems`               | Items that open the tablet from the inventory.                             |
| `Config.SSN`                       | Which database column is used as the citizen identifier.                   |
| `Config.Customization`             | Additional cosmetic tweaks of the interface.                               |
| `Config.Debug`                     | Debug prints in the server console.                                        |

## Running several tablets side by side (`Config.Base`)

Every module stores its data in its own MySQL table, named after the resource (`qf_mdt_mechanic_v2_*`). `Config.Base` lets you point any module at a different table, so a second workshop tablet can share selected data — the client records or the price list, for example — while keeping its own employees, announcements and radio codes.

```lua
Config.Base = {
    -- fines       = "qf_mdt_mechanic_v2_fines",
    -- tags        = "qf_mdt_mechanic_v2_tags",
    -- entityNotes = "qf_mdt_mechanic_v2_entity_notes",
    -- mugshots    = "qf_mdt_mechanic_v2_mugshots",
}
```

{% hint style="warning" %}
Anything you leave out keeps its own default table, so that data stays private to the company. When a table **is** shared, every tablet pointing at it must use the same value, and related tables (cases, evidences, warrants and their officer/citizen tables) have to be shared together.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://wiki.qfdevelopers.com/scripts/editor-22/configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
