For the complete documentation index, see llms.txt. This page is also available as Markdown.

Configuration

Page dedicated to how to configure our Police MDT [V2]

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

Config.NUI = {
    defaultLangCode = "en-US",
    -- Languages offered in the tablet's own language switcher.
    -- Remove entries you do not want players to be able to pick.
    langs = {
        { code = "en-US", name = "English", iconUrl = "https://.../gb.webp" },
        { code = "pl-PL", name = "Polski",  iconUrl = "https://.../pl.webp" },
    }
}

Commands & Keybinds

General

  • /qf_mdt_police_v2 (DELETE): Toggle the MDT Dashboard.

  • /qf_mdt_police_v2badge (B): Show/Hide Officer Badge. /badge works as a short alias.

  • /bodycam: Toggle the bodycam overlay. /showbodycam and /hidebodycam force one state.

Dispatch

  • /qf_mdt_police_v2_fastgps (E): Set the GPS to the latest dispatch alert.

  • /qf_mdt_police_v2_dispatch (HOME): Open the MDT straight on the dispatch page.

Camera Mode

  • /qf_mdt_police_v2_capturephoto (ENTER): Start capturing a photo.

  • /qf_mdt_police_v2_blocknuifocus (L-ALT): Block the NUI focus.

  • /qf_mdt_police_v2_cameratakephoto (SPACE): Take the photo.

  • /qf_mdt_police_v2_cameratogglefocus (L-ALT): Toggle mouse focus.

  • /qf_mdt_police_v2_cameratoggleflashlight (F): Toggle camera flashlight.

  • /qf_mdt_police_v2_cameratoggleside (R): Switch between Front/Back camera.

Radar

  • /qf_mdt_police_v2radartoggle (U): Toggle the entire Radar system.

  • Front Radar Settings

    • /qf_mdt_police_v2radarshowfront (F5): Show Front Radar.

    • /qf_mdt_police_v2radarhidefront (F6): Hide Front Radar

    • /qf_mdt_police_v2radartoggleinteractfront (PGUP): Lock/Unlock Front Radar target

  • Back Radar Settings

    • /qf_mdt_police_v2radarshowback (F7): Show Back Radar.

    • /qf_mdt_police_v2radarhideback (F8): Hide Back Radar

    • /qf_mdt_police_v2radartoggleinteractback (PGDN): Lock/Unlock Back Radar target

Note: Both the keys and the command names come from Config.ToggleMDT, Config.Camera, Config.Badge, Config.Radar and Config.Dispatch in config/config.lua — the names above are the defaults.

Running several tablets side by side (Config.Base)

Every module stores its data in its own MySQL table, named after the resource (qf_mdt_police_v2_*). Config.Base lets you point any module at a different table, which is how you run more than one tablet at the same time — e.g. qf_mdt_police_v2 plus a sheriff copy — each with its own events, exports and faction logic, while sharing selected data.

1. Configuring Ranks (Grades)

In config.lua, the Config.Grades table controls the hierarchy visible in the MDT. This must match your framework's job grades (ESX/QBCore/QBOX) to ensure correct label display.

2. Customizing Fines

You can add new categories and fines in Config.FineList.

3. Dispatch Colors & Vehicles

The dispatch system uses specific color codes for vehicles. These are defined in Config.Dispatch.Colors. When creating custom alerts, you can use these or standard RGB values.


Server-side Exports

Use these exports in your other resources to interact with the MDT backend.

AddLog

Adds an entry to the Audit Log. Useful for tracking evidence locker access, armory usage, or boss menu actions.

Syntax:

Parameters:

Parameter
Type
Description

source

number

Player Source ID.

tag

string

Category tag (e.g., 'armory', 'evidence', 'boss').

text

string

Log message.

color

string

Color theme ('blue', 'red', 'green', 'orange').

fields

table

(Optional) Key-value pairs for extra metadata.

args

table

(Optional) Arguments for translation if text is a locale key.

Example (Armory Usage):


Client-side Exports

Use these exports to integrate the MDT UI and systems with other scripts (e.g., Robbery scripts, Radar systems).

CreateDispatchAlert

Triggers a dispatch notification for all on-duty police.

Syntax:

Parameters:

Parameter
Type
Description

coords

vector3

Location of the alert.

title

string

Alert Header.

description

string

Detailed info (e.g., street name, vehicle info).

code

string

10-Code (e.g., '10-90').

colorRGB

table

{r, g, b} format.

maxOfficers

number

(Optional) flashing limit of units.

duration

number

(Optional) Time in ms the alert stays on screen.

Example (Bank Robbery):

showOfficerBadge

Displays the badge ID card on screen.

Syntax:

Data Structure:

Example:

AddHeistZone (Map)

Adds a visual zone to the live map, useful for ongoing robberies.

Syntax:

Example:

RemoveHeistZone

Removes a heist zone when the event is over.

Example:


Camera & Radar Exports

Bodycam

Control the immersion overlays.

Radar

Control the vehicle radar system programmatically.

Other exports

Export
Description

GetMugShotBase64(ped, transparent)

Renders a mugshot of the ped and returns it as a base64 string.

showDispatchAlert(data)

Draws a dispatch alert on screen without going through the dispatch system.

updateReactions(data)

Updates the unit reactions shown on an alert that is already on screen.

ShowHeistZones(zones) / SetHeistZones(zones)

Replaces the whole list of heist zones on the live map at once.

SetShootingZones(zones)

Replaces the whole list of shots-fired zones on the live map.

AddShootingZone(zone)

Adds a single shots-fired zone. Same shape as AddHeistZone.

RemoveShootingZone(id)

Removes a shots-fired zone by id.

Dispatch Integrations & Custom Alerts

Compatibility

Enable 3rd party script compatibility by editing config/config.lua.

Custom Alerts

Control and send dispatch alerts to the MDT programmatically.

1. Client-Side Export

You can use the following export directly in any client-side script.

2. Server-Side Event (or Client TriggerServerEvent)

If you need to trigger a dispatch from the server, or prefer passing a data table, you can use the built-in server event.

Resetting Officer Hours

The Police MDT tracks on-duty hours for all officers. These hours can be manually reset via a server callback. The system verifies if the player executing the reset has the appropriate job permissions defined in Config.Jobs.

  • Callback Name: qf_mdt_police_v2/resetOfficerHours

  • Target Identifier: id (Character Identifier / CitizenID / License)

Code Example

Duty Status Change Hook

We have added a server-side hook that triggers whenever an officer changes their duty status via the MDT (e.g., clicking "Available" or "Unavailable"). This is useful for synchronizing the MDT state with other job-related systems or triggering custom events.

  • Location: config/server/editable.lua

  • Function: EDITABLE.OnStatusChange(source, status)

Usage Example

This hook is defined in the editable configuration file and can be used to trigger framework-specific duty events:

Last updated