Advance Dispatch system
This page explains how to configure the Config.lua file for the Advanced Dispatch System.
🧩 Framework Configuration
Config.Framework
Config.FrameworkDetermines which core framework your server uses. Supported frameworks:
QB-core— for QBCore-based serversESX— for ESX-based servers (if supported)
Config.Framework = "QB-core"💡 Tip: Ensure your dispatch script matches the framework APIs in use.
🧑🚒 Job Access Configuration
Config.Jobs
Config.JobsDefines which jobs have access to receive and manage dispatch alerts.
Config.Jobs = {"police", "firefighter", "ambulance"}✅ Allowed Jobs:
Police
Firefighters
Ambulance / EMS
💡 You can add more jobs (e.g., "tow", "rescue", "security") if your dispatch system supports them.
⚙️ Exported Function
CreateDispatch(name, location, postal, description, coords)
Type: client export
Defined in: client.lua
Exported by: DevNation_Dispatch
🧩 Parameters
name
string
The title of the dispatch call (e.g., "Robbery in Progress")
location
string
A short text location (e.g., "Downtown Vinewood")
postal
string
The postal code or area identifier (e.g., "4021")
description
string
A detailed description of the incident
coords
vector4
The exact position and heading of the call (e.g., vector4(312.46, 4337.35, 49.37, 78.84))
💻 Usage Example
From another client resource:
exports["DevNation_Dispatch"]:CreateDispatch(
"Armed Robbery",
"Downtown Vinewood",
"4021",
"Multiple suspects armed with handguns inside the store.",
vector4(373.875, 326.896, 103.566, 257.96)
)🧪 Development Mode
Config.EnableTestDispatch
Config.EnableTestDispatchToggles the Test Dispatch Mode, which allows you to simulate fake callouts and alerts during development.
Config.EnableTestDispatch = truetrue→ Enables test mode (for testing/debugging)false→ Disables test mode (recommended for live servers)
❗ Important: Keep this off on production servers to prevent spam or unintended dispatch calls.
📏 Distance Display System
Config.DistanceUnit
Config.DistanceUnitDetermines which distance unit is shown in dispatch messages and GPS data.
Config.DistanceUnit = "imperial"Options:
"metric"— Displays in kilometers/meters"imperial"— Displays in miles/feet
💡 Choose "metric" for EU-based servers and "imperial" for US-based ones.
🧾 Default Unit Identification
Config.StartName
Config.StartNameSpecifies the default display name for units without registered data.
Config.StartName = "Unknown"Config.StartCallsign
Config.StartCallsignDefines the default callsign displayed when a unit has not set a callsign.
Config.StartCallsign = "[Unknown]"🪪 Example Display:
Unit: Unknown
Callsign: [Unknown]🧭 Recommended Settings
Development
QB-core
metric
true
Enables debug events
Production
QB-core
imperial
false
Default setup
EU RP Server
ESX
metric
false
Uses kilometers
US RP Server
QB-core
imperial
false
Uses miles
⚙️ Quick Reference Summary
Config.Framework
Core framework type
"QB-core"
Config.Jobs
Jobs allowed to receive dispatches
{"police", "ambulance"}
Config.EnableTestDispatch
Enables test dispatch events
true
Config.DistanceUnit
Unit system for distances
"imperial"
Config.StartName
Default unit name
"Unknown"
Config.StartCallsign
Default callsign
"[Unknown]"
🧰 Troubleshooting
No dispatch alerts
Wrong framework selected
Check Config.Framework
Wrong distance units
Incorrect unit system
Update Config.DistanceUnit
Some jobs missing alerts
Job not listed in config
Add job to Config.Jobs
Test alerts appearing in live server
Dev mode enabled
Set EnableTestDispatch = false
Last updated
