LG Dispatch

LG Dispatch provides a small set of exports that allow other scripts to interact with the dispatch system.

These exports allow developers to:

  • Create dispatch calls

  • Trigger officer panic buttons

  • Retrieve active calls

This allows easy integration with systems such as:

  • Robbery scripts

  • Gunshot detection systems

  • Alarm systems

  • Panic button items

  • Emergency alerts

  • + many more!

CreateDispatchCall

Creates a new call in the dispatch system and broadcasts it to all on-duty units.

exports['LG_Dispatch']:CreateDispatchCall(callData)

Example Usage

local callId = exports['LG_Dispatch']:CreateDispatchCall({
    type        = 'robbery',
    priority    = 1,
    coords      = { x = 215.3, y = -810.5, z = 30.7 },
    street      = 'Strawberry Ave',
    description = 'Armed robbery at Fleeca Bank',
    suspectInfo = 'IC1 male wearing black hoodie',
    vehicleInfo = 'Red Dominator, plate ABC123',
    createdBy   = 'Store Alarm'
})

Fields

type

The call type from your config in the Config.CallTypes table.

Example:


priority

The call priority / grade level.

If not provided, the defaultPriority from the call type will be used.

Example:


coords

The world coordinates where the incident occurred.

Format:


street

The street or location name.

Example:

If not provided it defaults to Unknown Location.


description

A description of the incident.

Example:


callerNotes

Additional notes from the caller.

Example:


suspectInfo

Description of suspects involved.

Example:


vehicleInfo

Vehicle description or plate information.

Example:


postal

Postal code if your server uses a postal system.

Example:


createdBy

The name of the system or person who created the call.

Example:


GetActiveCalls

Returns all currently active dispatch calls.

Example Usage

Returns

An array containing all active call objects.


Panic Button

Triggers a Grade 1 officer assistance call at the player's location.

Example Usage

What Happens

When triggered:

  • A Grade 1 panic call is created

  • The officer's current location is used

  • The call is broadcast to all emergency units

  • The panic alert sound plays (if enabled)


Default Configuration

Below is the default configuration included with LG Dispatch.

Last updated