Commands#
The first five names are set in Config.Commands; the citizen commands live in client/custom/misc/commands.lua. Dispatch and MDT commands only work on duty with an allowed job.
Command | Who | Description |
|---|---|---|
| Allowed jobs | Opens the dispatch panel. |
| Allowed jobs | Shows the small call pop-up. |
| Allowed jobs | Lets you drag the small pop-up to another place. |
| Allowed jobs | Turns the vehicle speed radar off or on. |
| MDT jobs and grades | Opens the MDT. Disabled when |
| Everyone | Go on or off duty for the dispatch. |
| Everyone | A 911 call to police with a photo. 20-second cooldown. |
| Everyone | A call to EMS. |
| Everyone | A call to mechanics. |
| Everyone | A call to taxi drivers. |
| Everyone | A flashing PANIC CALL to police, kept for five minutes. |
| Admins (ace) | Opens the CCTV camera creator. Needs |
| Downed players | Sends the distress signal. Bound to G. Only with the Outlaw Alert DLC. |
Keybinds#
All keybinds are registered with FiveM, so each player can rebind them in Settings → Key Bindings → FiveM. They only respond while on duty.
Default | Config | Does |
|---|---|---|
L |
| Open the dispatch panel. |
K |
| Show the small dispatch. |
U |
| Move the small dispatch. |
← / → |
| Previous and next call in the small dispatch. |
G |
| Respond to, or stop responding to, the call shown. |
E |
| Send the charged suspects nearby to prison, at a booking point. |
Client Exports#
For sending alerts, driving duty from another script, or opening the MDT from a tablet prop or a radial menu. The 35 ready-made alert exports are listed in Create Dispatch Call.
GetPlayerInfo — the player's position and vehicle
local info = exports['qs-dispatch']:GetPlayerInfo()
-- info.coords, info.street_1, info.street_2, info.sex,
-- info.vehicle, info.vehicle_label, info.vehicle_colour, info.vehicle_plate,
-- info.speed, info.doorCount, info.ped, info.networkEntityIdEvery field is described in Create Dispatch Call.
getSSURL — take a photo for a call
exports['qs-dispatch']:getSSURL(function(url)
-- url is the uploaded screenshot, or nil
end)Captures the player's screen and uploads it to Config.DiscordWebHook. Returns nil when Config.AllowImages is off or no webhook is set. No extra screenshot resource is needed.
ToggleDuty and GetIsOnDuty — duty from another script
exports['qs-dispatch']:ToggleDuty(true) -- on duty
exports['qs-dispatch']:ToggleDuty(false) -- off duty
if exports['qs-dispatch']:GetIsOnDuty() then
-- ...
endCall ToggleDuty from your duty or clock-in script so the dispatch follows it.
Opening the MDT from another script
-- the current MDT, skipping the job check (like the item does)
TriggerEvent('qs-dispatch:client:OpenMdt')
-- the classic MDT (Config.MDT.newMdt = false)
exports['qs-dispatch']:TogleMdt(true)TogleMdt is spelled with one g.
addCustomPage — add your own section to the MDT
Adds an entry to the MDT sidebar that shows any web page inside the MDT — your own NUI from another resource, or an external site.
exports['qs-dispatch']:addCustomPage({
title = 'Evidence', -- the sidebar label
image = 'https://example.com/evidence-icon.png', -- the sidebar icon
ui = 'https://cfx-nui-my-evidence/web/index.html', -- the page shown
})All three fields are required; the export returns true when the page is added. Call it on the client after qs-dispatch has started.
Server Exports#
GetPlayerInfo and GetSSURL — a player's data from the server
The same data as the client exports, read from a given player. Both wait for that player's client, so run them in a thread.
CreateThread(function()
exports['qs-dispatch']:GetPlayerInfo(playerId, function(info)
print(info.street_1, info.vehicle_plate)
end)
exports['qs-dispatch']:GetSSURL(playerId, function(url)
print(url)
end)
end)SendWebhook — post an embed to Discord
exports['qs-dispatch']:SendWebhook(
'https://discord.com/api/webhooks/...', -- webhook URL
'Sheriff Call', -- title
'#c28a00', -- colour, as a hex string
'A message for the log', -- description
imageUrl -- optional picture
)Used by onCallEvent.lua for the call logs; reuse it for your own.
Events#
Events other resources can use:
Event | Side | What it does |
|---|---|---|
| Server | Creates a dispatch call. Payload in Create Dispatch Call. |
| Client | Opens the MDT, as using the item does. |
| Client | Removes a call by id, or every call with |
| Client | Plays the speed-camera flash on the player's screen — useful for "caught on camera" moments. |
| Client | Closes the prison screen and plays the release scene. To release someone properly, use the MDT, which also clears the database. |
Server Hook: OnCallEvent#
Every call created on the server runs OnCallEvent in server/custom/events/onCallEvent.lua. Edit it to react to calls — logs, phone messages, statistics:
function OnCallEvent(job, callLocation, callCode, message, flashes, image, callId)
if Contains(job, 'sheriff') then
exports['qs-dispatch']:SendWebhook(SheriffWebhookURL, 'Sheriff Call', '#c28a00', message, image)
end
endjob can be a string or a list, which is why the example uses Contains.



