Additional Informations
Page dedicated to Additional Informations about our Mechanic MDT [V2].
Core Features
Universal Framework Support: Works with ESX, QBCore and QBox.
Repair Jobs: Generated jobs around the map with per-fault repair steps, client peds, tow integration and automatic payouts.
Client & Vehicle Records: Searchable citizens and vehicles with notes, tags, mugshots and license overview.
Invoicing: Configurable price list, per-grade limits and bridges into most popular billing and banking resources.
Dispatch & Live Map: Jobs with a full life cycle, an archive, quick keys,
/mechlocationand the civilian line/913, plus a live map of workshops and vehicles.Several Workshops: LS Customs, Benny's and others on one tablet, each with its own ranks, colours and society.
Banking V2 Billing: Optional price list and invoices through our Banking [V2].
Developer API (Exports & Events)
AddLog
Adds an entry to the Audit Log — useful for logging tool usage, parts withdrawal or boss menu actions from other resources.
Syntax:
exports.qf_mdt_mechanic_v2:AddLog(source, tag, text, color, fields, args)source
number
Player source ID. nil is logged as "System".
tag
string
Category tag (e.g. 'parts', 'tasks', 'boss').
text
string
Log message.
color
string
Color theme: blue, red, green, orange, black.
fields
table
(Optional) Key-value pairs with extra metadata.
args
table
(Optional) Arguments for translation if text is a locale key.
exports.qf_mdt_mechanic_v2:AddLog(
source,
"parts",
"Withdrew parts from the workshop stock",
"orange",
{
part = "Turbocharger",
amount = 1,
vehicle = "ABC 123"
}
)CreateCall
Raises a call on the dispatch board from another resource. Everything except the title and the coordinates is optional.
Returns the id of the call, or nil when a free zone or the deduplication window dropped it.
CreateCitizenCall
Raises a call on behalf of a player who has no tablet, for example from a phone app. Coordinates default to the player's position. To show the caller's phone number, add EDITABLE.GetPhoneNumber(xPlayer) returning it to config/server/editable.lua (the same function as in the Police MDT [V2]); it is not asked for anonymous calls.
CloseCall
Closes an active call and writes it to the archive.
Other server exports
GetOfficerBadge(identifier) / SetOfficerBadge(identifier, badge)
Reads or sets an employee's badge number.
GetOfficerHours(identifier)
Hours on duty.
RefreshOfficer(identifier)
Rereads badge, grade and radio of an online employee.
GetFineCatalogue()
The price list, read by Banking V2 when the tablet is first switched on there.
CreateDispatchAlert
Sends a dispatch alert to every employee on duty.
coords
vector3
Location of the alert.
title
string
Alert header.
description
string
Detailed info, e.g. street name and vehicle.
code
string
Dispatch code.
colorRGB
table
{r, g, b} format.
maxUnits
number
(Optional) How many units may attach.
duration
number
(Optional) Time in ms the alert stays on screen.
Badge & Bodycam
Other exports
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.
config/server/editable.lua and config/client/editable.lua hold the functions that talk to the rest of your server. They are plain Lua and meant to be edited — this is where you adapt the tablet to a custom licence system, a custom billing resource or your own name lookup.
Frequently changed hooks:
EDITABLE.GetBadge(xPlayer)
Badge number shown on the employee badge.
EDITABLE.GetName(identifier)
How a citizen's name is resolved from your database.
EDITABLE.GetPlayerLicenses(identifier)
Where licenses are read from.
EDITABLE.GiveLicense / RevokeLicense
How licenses are granted and revoked.
EDITABLE.GetPlayerVehicles(identifier)
Vehicle lookup for the records page.
EDITABLE.GetVehicleModel(source, modelID)
Turning a model hash into a readable name.
EDITABLE.ChargePlayer(source, amount, why)
How a client is charged for an invoice.
EDITABLE.AddMoneyToSociety(amount, jobName)
Where the company share of an invoice goes.
EDITABLE.CreateBilling(...)
Bridge into your billing resource.
EDITABLE.TakeMugshot(playerId)
Mugshot capture.
EDITABLE.OnStatusChange(source, status)
Fired when an employee goes available/unavailable — see below.
EDITABLE.CanOpenMDT() (client)
Extra conditions before the tablet may open.
Duty status hook
Frequently Asked Questions (Q&A)
Q: The tablet does not open at all.
A: Check that the player's job matches Config.Jobs and that their grade exists in Config.Grades. Config.Debug = true prints the resolved job and grade to the server console.
Q: Repair jobs never appear on the Tasks page.
A: Jobs are generated on an interval — Config.Tasks.RefreshInterval — up to MaxAvailableJobs at a time. Right after a restart the first batch takes one interval to appear.
Q: Recovery jobs should use my tow script instead.
A: Set the matching entry in Config.Tasks.CustomTowScript, e.g. jo_towtruck = true. The tablet then hands the vehicle over instead of running its own recovery logic.
Q: Invoices do not show up in my billing resource.
A: Enable exactly one entry in Config.Billings. If your resource is not listed, implement EDITABLE.CreateBilling in config/server/editable.lua instead.
Q: Alerts appear twice on screen.
A: An external dispatch is drawing them as well. Set Config.Dispatch.ShowOnScreenAlerts = false.
Last updated

