For the complete documentation index, see llms.txt. This page is also available as Markdown.

Dispatch Integration

GKS Tablet has a built-in Police/EMS dispatch system. Calls appear in the MDT Dispatch tab, overlay (O key), and map blips.

Two ways to send a call:

  1. Export β€” recommended for new scripts

  2. Bridge β€” auto-captures events from known third-party dispatch resources


Call from any server script:

exports['gks-tablet']:createDispatch({
    title    = "Store Robbery",
    message  = "Armed suspect at 24/7",
    coords   = vector3(-47.0, -1757.0, 29.0),
    code     = "10-90",
    priority = "high",       -- "high" | "medium" | "low"
    job      = "police",     -- "police" | "ambulance"
    location = "Grove St",   -- optional street label
    blip     = { sprite = 161, color = 1 },
    fields   = {             -- optional extra info rows
        { icon = "fas fa-car", label = "Plate", value = "ABC 123" },
    },
})

Minimal example:

Payload reference

Field
Required
Values

title

yes

Call title shown in MDT

message / description

yes

Call details

coords

yes

vector3 or { x, y, z }

job

no

"police" (default) or "ambulance"

priority

no

"high", "medium", "low" (default: low)

code

no

e.g. "10-90"

location

no

Street/area label

blip

no

{ sprite, color, size, label }

fields

no

Array of { icon, label, value } (max 8)


2. Built-in Bridges

If your server already uses a third-party dispatch resource, GKS can listen for its events automatically. No changes needed in robbery/heist scripts.

Enable in config/config.lua:

Set a bridge to false to disable it without turning off dispatch entirely.


3. Add Your Own Bridge

For a dispatch system not listed above, add a file under server/dispatch/:

Then register it:

  1. Add my_dispatch = true to Config.Dispatch.Bridges

  2. Add "server/dispatch/my_dispatch.lua" to fxmanifest.lua (after init.lua)

Reference implementations: server/dispatch/ps_dispatch.lua, server/dispatch/emergencydispatch.lua


Troubleshooting

Problem
Fix

No call appears

Config.Dispatch.Enabled = true and correct job value

Duplicate calls

Disable GKS AutoAlerts or the external dispatch auto-detect

Bridge not working

Check Bridges.<name> = true and resource load order in fxmanifest.lua

Last updated