Configuration
Page dedicated to how to configure our Police MDT [V2]
Languages
You can set the language of the script in the configuration file.
en-US: Englishfr-FR: Frenchpl-PL: Polishde-DE: Germanes-ES: Spanishpt-PT: Portugeseja-JP: Japanesees-IT: Italianko-KR: Korean
Config.Locale = "en-US"Commands & Keybinds
General
/mdtlspd(DELETE): Toggle the MDT Dashboard./qfmdtbadge(B): Show/Hide Officer Badge.
Camera Mode
/qfmdtpolicecapturephoto(ENTER / SPACE): Take a photo./qfmdtpolicecameratogglefocus(L-ALT / RMB): Toggle mouse focus./qfmdtpolicecameratoggleflashlight(F): Toggle camera flashlight./qfmdtpolicecameratoggleside(R): Switch between Front/Back camera.
Radar
/qfmdtradartoggle(U): Toggle the entire Radar system.Front Radar Settings
/qfmdtradarshowfront(F5): Show Front Radar./qfmdtradarhidefront(F6): Hide Front Radar/qfmdtradartoggleinteractfront(PGUP): Lock/Unlock Front Radar target
Back Radar Settings
/qfmdtradarshowback(F7): Show Back Radar./qfmdtradarhideback(F8): Hide Back Radar/qfmdtradartoggleinteractback(PGDN): Lock/Unlock Back Radar target
Note: All keys are configurable in config.lua.
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
AddLogAdds an entry to the Audit Log. Useful for tracking evidence locker access, armory usage, or boss menu actions.
Syntax:
Parameters:
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
CreateDispatchAlertTriggers a dispatch notification for all on-duty police.
Syntax:
Parameters:
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
showOfficerBadgeDisplays the badge ID card on screen.
Syntax:
Data Structure:
Example:
AddHeistZone (Map)
AddHeistZone (Map)Adds a visual zone to the live map, useful for ongoing robberies.
Syntax:
Example:
RemoveHeistZone
RemoveHeistZoneRemoves a heist zone when the event is over.
Example:
Camera & Radar Exports
Bodycam
Control the immersion overlays.
Radar
Control the vehicle radar system programmatically.
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)
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/resetOfficerHoursTarget 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.luaFunction:
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

