This page explains how to configure the Config.lua file for the Advanced Dispatch System.
🧩 Framework Configuration
Config.Framework
Determines which core framework your server uses.
Supported frameworks:
QB-core — for QBCore-based servers
ESX — for ESX-based servers (if supported)
💡 Tip: Ensure your dispatch script matches the framework APIs in use.
🧑🚒 Job Access Configuration
Defines which jobs have access to receive and manage dispatch alerts.
✅ Allowed Jobs:
💡 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
The title of the dispatch call (e.g., "Robbery in Progress")
A short text location (e.g., "Downtown Vinewood")
The postal code or area identifier (e.g., "4021")
A detailed description of the incident
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:
🧪 Development Mode
Config.EnableTestDispatch
Toggles the Test Dispatch Mode, which allows you to simulate fake callouts and alerts during development.
true → 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
Determines which distance unit is shown in dispatch messages and GPS data.
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
Specifies the default display name for units without registered data.
Config.StartCallsign
Defines the default callsign displayed when a unit has not set a callsign.
🪪 Example Display:
🧭 Recommended Settings
Environment
Framework
Unit System
Test Mode
Notes
⚙️ Quick Reference Summary
Setting
Description
Example
Jobs allowed to receive dispatches
Config.EnableTestDispatch
Enables test dispatch events
Unit system for distances
🧰 Troubleshooting
Update Config.DistanceUnit
Test alerts appearing in live server
Set EnableTestDispatch = false
Last updated