FreeScriptQBCore
ps-dispatch
by Project-Sloth · version 3.0.0 · updated 2 days ago
No reviews yet
- Downloads
- 0
- Reviews
- 0
- Size
- 476 KB
- Code check
- Clean
- Licence
- GPL-3.0
- Released
- Nov 2026
QBCore Dispatch
ps-dispatch
Dispatch and alert system for FiveM. Built with Svelte and Lua. Works on QBCore and QBX.
What is this
The radio board for your emergency services. Crimes fire alerts, officers respond with a keypress, and the dispatch menu shows every open call with its position, the units on it, and what is known about the suspect and their vehicle.
Alerts are more than notifications here. A call carries the vehicle's plate drawn on its real plate design, the weapon graded by how dangerous it is, the caller's identity, a map crop of the scene, and a search radius when the position is only approximate. Supervisors can declare a major incident to pin it for everyone, and each officer keeps a private log of the plate checks they have run.
Dependencies
Resource, Why
Installation1. Build the frontend
The build writes to
2. Add to server.cfg
3. Set your jobs
Configuration
Everything lives in
Jobs and who sees what
Keybinds and commands
Alert appearance
Sounds
Three tiers, each a native GTA sound pair:
Only the critical tier takes
Critical alerts (priority 0)
A tier above the existing red, for calls that make every unit drop what it is doing.
Nothing is renumbered — other resources keep sending priority 1/2/3 and keep their meaning. Only these code names are lifted above them, and the upgrade happens once on the server, so alerts arriving via
Repeated reports still escalate a routine call to priority 1, but never into this tier: critical is granted, not accumulated. Otherwise noise climbs back to the top over time, which is the problem the tier was added to fix.
Critical calls sort to the top of the board and carry their own treatment — a heavier border and a slow pulse rather than another shade of red, since two reds are hard to tell apart at a glance. The reduced-motion preference drops the pulse and keeps the weight.
Keep the list short. A board where half the calls are critical is the situation this replaced.
Merging and hotspots
A repeat report within the merge window bumps the existing call's count instead of creating a new one, and refreshes the fields listed in
Search radius and position offset
Alerts with
The displacement is bounded by the circle's own radius, so the incident is always inside the area being searched. It is area-uniform rather than radius-uniform: every point in the circle is equally likely, so the centre is no better a guess than the edge.
Two further rules make the circle mean what it says:
Dispatch and alert system for FiveM. Built with Svelte and Lua. Works on QBCore and QBX.
What is this
The radio board for your emergency services. Crimes fire alerts, officers respond with a keypress, and the dispatch menu shows every open call with its position, the units on it, and what is known about the suspect and their vehicle.
Alerts are more than notifications here. A call carries the vehicle's plate drawn on its real plate design, the weapon graded by how dangerous it is, the caller's identity, a map crop of the scene, and a search radius when the position is only approximate. Supervisors can declare a major incident to pin it for everyone, and each officer keeps a private log of the plate checks they have run.
Dependencies
Resource, Why
qb-core or qbx_core, player data, jobs, gradesox_lib, callbacks, notifications, locales, keybindslsn-radar DOWNLOAD, Police Radar, Perfect Fit for both ps-mdt and ps-dispatchPolyZone, alert zonesInstallation1. Build the frontend
cd ui
npm install
npm run buildThe build writes to
html/ and empties that folder first. Anything you want served belongs in ui/public/ — that is where the plate images live.2. Add to server.cfg
ensure ps-dispatch3. Set your jobs
Config.Jobs decides who receives alerts at all. Everything else is optional.Configuration
Everything lives in
shared/config.lua.Jobs and who sees what
Config.Jobs = { 'police', 'ambulance' } -- jobs that receive alerts
Config.OnDutyOnly = true -- off-duty units stay quiet
Config.FilterOnDuty = true -- and don't even receive the event
Config.FilteredBroadcast = true -- send only to eligible playersFilteredBroadcast matters on a busy server: with it off, every alert goes to every player and each client throws away what isn't theirs — bandwidth and event handling that scales with your slot count for no benefit.Keybinds and commands
Config.RespondKeybind = 'E' -- attach to the alert on screen
Config.OpenDispatchMenu = 'O' -- open the board
Config.TestCommand = 'dispatchtest'/dispatchsound plays the routine, priority and critical tones in sequence so you can hear them against each other. /dispatchsound tries an arbitrary pair.Alert appearance
Config.AlertTime = 5 -- seconds on screen; per-alert override in alerts.lua
Config.MaxVisibleAlerts = 3
Config.AlertPosition = 'right'
Config.MaxCallList = 25 -- calls kept on the board
Config.CallLifetime = 3600 -- seconds before a call ages out
Config.UnattendedAfter = 120 -- seconds before a call is flagged unattendedSounds
Three tiers, each a native GTA sound pair:
Config.AlertSounds = {
default = { audioName = 'Lose_1st', audioRef = 'GTAO_FM_Events_Soundset' },
priority = { audioName = 'CHECKPOINT_MISSED', audioRef = 'HUD_MINI_GAME_SOUNDSET' },
critical = {
audioName = 'TIMER_STOP',
audioRef = 'HUD_MINI_GAME_SOUNDSET',
repeats = 2,
gapMs = 700,
},
}Only the critical tier takes
repeats and gapMs. The repeat matters more than the tone: two unfamiliar beeps are hard to tell apart mid-firefight, but a burst is recognisable even when you can't name the sound. repeats = 1 gives a single hit. 10_SEC_WARNING and 5_SEC_WARNING from the same soundset are drop-in alternatives.Critical alerts (priority 0)
A tier above the existing red, for calls that make every unit drop what it is doing.
Config.CriticalCodes = {
'officerdown', 'officerbackup', 'officerdistress', 'emsdown',
'bankrobbery', 'pacificbankrobbery', 'paletobankrobbery',
'vangelicorobbery', 'humanelabsrobbery', 'unionrobbery', 'prisonbreak',
}Nothing is renumbered — other resources keep sending priority 1/2/3 and keep their meaning. Only these code names are lifted above them, and the upgrade happens once on the server, so alerts arriving via
CustomAlert are covered by their code name alone.Repeated reports still escalate a routine call to priority 1, but never into this tier: critical is granted, not accumulated. Otherwise noise climbs back to the top over time, which is the problem the tier was added to fix.
Critical calls sort to the top of the board and carry their own treatment — a heavier border and a slow pulse rather than another shade of red, since two reds are hard to tell apart at a glance. The reduced-motion preference drops the pulse and keeps the weight.
Keep the list short. A board where half the calls are critical is the situation this replaced.
Merging and hotspots
Config.CallMerge = { ... } -- identical nearby reports bump one call
Config.Hotspot = { ... } -- repeated incidents on the same streetA repeat report within the merge window bumps the existing call's count instead of creating a new one, and refreshes the fields listed in
MERGE_REFRESH_FIELDS in server/main.lua. Fields identifying the same person or vehicle travel together there, so a merged report can't pair one officer's callsign with another's name.Search radius and position offset
Alerts with
offset = true in Config.Blips report an approximate position: officers get a circle to search rather than a pin to drive to.
Config.MinOffset = 1
Config.MaxOffset = 120The displacement is bounded by the circle's own radius, so the incident is always inside the area being searched. It is area-uniform rather than radius-uniform: every point in the circle is equally likely, so the centre is no better a guess than the edge.
Two further rules make the circle mean what it says:
- The offset is fixed per call. Repeat reports move the circle with the incident but reuse the same displacement. Re-randomising each time would let anyone average the jumps and triangulate the true spot.
- **The true coordinates nev