General

Details

Below, you will find detailed configuration for general config.

Configuration file

config/general.lua
return {
    ---@type boolean
    disableVersionCheck = false,

    -- Allowed groups to use dispatch
    ---@type string[]
    allowedGroups = { 'police', 'ambulance', 'taxi' },

    --- Groups that are required to be on duty to use dispatch
    ---@type string[]
    requiredDutyGroups = { 'police', 'ambulance' },

    -- Shared between these groups
    -- This will share units, drawings, cameras and logs
    ---@type table<string[]>
    sharedBetweenGroups = {
        { 'police', 'ambulance' },
    },

    ---@type table<string, number>
    dispatcher = {
        ['police'] = 0,
        ['ambulance'] = 0
    },

    -- Whether body cams are enabled
    ---@type boolean
    bodyCamsEnabled = true,

    --[[
        If a group is listed in `bodyCamsSharedBetween`, they will share body cams with those groups
    ]]
    ---@type table<string[]>
    bodyCamsSharedBetween = {
        { 'police', 'ambulance' }
    },

    --[[
        Minimum permission level required to use body cams for each group
    ]]
    ---@type table<string, number>
    bodyCamsPermissions = {
        ['police'] = 2
    },

    ---@type Status[]
    statuses = {
        { name = locale('unit_status_available'),   color = '#539D1B', default = true },
        { name = locale('unit_status_unavailable'), color = '#F05B56' },
        { name = locale('unit_status_processing'),  color = '#E46211' },
        { name = locale('unit_status_training'),    color = '#009DE0' },
        { name = locale('unit_status_undercover'),  color = '#2E570F' },
    },

    ---@type QuickDispatchConfig
    quickDispatch = {
        enabled = true,
        allowedGroups = { 'police' },

        defaultStyle = 'old',
        enabledByDefault = true
    },

    ---@type RadarConfig
    radar = {
        --- Whether radar is enabled
        ---@type boolean
        enabled = true,

        -- if defined, it will enable radar for certain groups
        ---@type string[]
        allowedGroups = { 'police' },

        ---@type number[]
        allowedVehicleClass = { 18 },

        ---@type string[]
        allowedVehicleModels = {},

        ---@type boolean
        enabledByDefault = true,

        -- The unit used to display the speed
        ---@type 'kmh' | 'mph'
        speedUnits = 'kmh',

        --- The range of entity detection
        --- uses GTA units
        ---@type number
        range = 100,

        --- The interval in milliseconds, that is used for loop
        ---@type number
        updateInterval = 550,

        ---@type RadarReceiptConfig
        radarReceipts = {
            enabled = true,

            command = 'radar_receipt',

            item = 'radar_receipt',
        }
    },

    ---@type ReaderConfig
    reader = {
        ---@type boolean
        enabled = true,

        ---@type string[]
        allowedGroups = { 'police' },

        ---@type number[]
        allowedVehicleClass = { 18 },

        ---@type string[]
        allowedVehicleModels = {},

        ---@type boolean
        enabledByDefault = true
    },

    keybinds = {
        -- Opens full dispatch view
        -- can be set to `false` or `nil` to disable the keybind
        ---@type string | boolean | nil
        fullView = 'O',

        -- Toggle components dragging. Applies to quick dispatch, radar, reader.
        -- can be set to `false` or `nil` to disable the keybind
        ---@type string | boolean | nil
        componentsDragging = 'K',

        -- Toggle quick dispatch visibility
        -- can be set to `false` or `nil` to disable the keybind
        ---@type string | boolean | nil
        quickDispatchVisibility = 'L',

        -- Respond to alert in quick dispatch
        -- can be set to `false` or `nil` to disable the keybind
        ---@type string | boolean | nil
        quickDispatchRespondToAlert = 'G',

        -- Join radio channel in quick dispatch
        -- can be set to `false` or `nil` to disable the keybind
        ---@type string | boolean | nil
        quickDispatchJoinRadio = 'J',

        -- Join radio channel for whole unit in quick dispatch
        -- can be set to `false` or `nil` to disable the keybind
        ---@type string | boolean | nil
        quickDispatchJoinUnitRadio = false,

        -- Respond to alert in quick dispatch
        -- can be set to `false` or `nil` to disable the keybind
        ---@type string | boolean | nil
        quickDispatchMarkOnGps = 'H',

        -- Archive current alert via quick dispatch
        -- can be set to `false` or `nil` to disable the keybind
        ---@type string | boolean | nil
        quickDispatchArchiveAlert = false,

        -- Toggle compact mode on quick dispatch (hides controls, shows attach status only)
        -- can be set to `false` or `nil` to disable the keybind
        ---@type string | boolean | nil
        quickDispatchCompactToggle = false,

        -- Toggle radar visibility
        -- can be set to `false` or `nil` to disable the keybind
        ---@type string | boolean | nil
        toggleRadar = 'NUMPAD1',

        -- Toggle reader visibility
        -- can be set to `false` or `nil` to disable the keybind
        ---@type string | boolean | nil
        toggleReader = 'NUMPAD2',

        -- Radar and reader lock
        -- can be set to `false` or `nil` to disable the keybind
        ---@type string | boolean | nil
        radarLock = 'NUMPAD4',
    },

    ---@type CommandsConfig
    commands = {
        -- Opens full dispatch view
        -- can be set to `false` or `nil` to disable the command
        ---@type string | boolean | nil
        toggleFullView = 'dispatch',

        -- Toggle components dragging. Applies to quick dispatch, radar, reader.
        -- can be set to `false` or `nil` to disable the command
        ---@type string | boolean | nil
        componentsDragging = 'dragDispatch',

        -- Toggle quick dispatch visibility
        -- can be set to `false` or `nil` to disable the command
        ---@type string | boolean | nil
        quickDispatchVisibility = false,

        -- Respond to alert in quick dispatch
        -- can be set to `false` or `nil` to disable the command
        ---@type string | boolean | nil
        quickDispatchRespondToAlert = false,

        -- Join radio channel in quick dispatch
        -- can be set to `false` or `nil` to disable the command
        ---@type string | boolean | nil
        quickDispatchJoinRadio = false,

        -- Join radio channel for whole unit in quick dispatch
        -- can be set to `false` or `nil` to disable the command
        ---@type string | boolean | nil
        quickDispatchJoinUnitRadio = false,

        -- Mark on GPS in quick dispatch
        -- can be set to `false` or `nil` to disable the command
        ---@type string | boolean | nil
        quickDispatchMarkOnGps = false,

        -- Toggle radar visibility
        -- can be set to `false` or `nil` to disable the command
        ---@type string | boolean | nil
        toggleRadar = false,

        -- Toggle reader visibility
        -- can be set to `false` or `nil` to disable the command
        ---@type string | boolean | nil
        toggleReader = false,

        -- Radar and reader lock
        -- can be set to `false` or `nil` to disable the command
        ---@type string | boolean | nil
        radarLock = false,
    },

    ---@type CallsignConfig
    callSign = {
        canChange = true,
        allowedGroups = { 'police', 'ambulance' }
    },

    ---@type boolean
    serverSideEntities = false,

    ---This enables or disables the opacity on the full view.
    ---@type boolean
    useOpacity = true,

    ---Hides the HUD (dispatch, radar, plate reader) while the pause menu / map is open.
    ---@type boolean
    hideHudOnPauseMenu = true,
}

Detailed types information

disableVersionCheck boolean

If enabled, the script will not check for new versions on startup.

allowedGroups table<string>

Defines groups, which are allowed to use dispatch.

requiredDutyGroups table<string>

Defines group, which requires duty to use dispatch.

sharedBetweenGroups table<string[]>

Defines groups, which share drawings, units and some other data.

dispatcher table<string, number>

Defines grade, which will be treated as a dispatcher for a certain group.

bodyCamsEnabled boolean

Enables or disables body cams feature entirely. When set to false, the body cam button is hidden from the UI and the server rejects any body cam requests.

bodyCamsSharedBetween table<string[]>

Defines which groups can view each other’s body cams. Groups listed in the same sub-table can watch each other’s body cameras.

bodyCamsPermissions table<string, number>

Minimum grade required to use body cams for each group. If a group is not listed, no grade restriction is applied.

serverSideEntities boolean

Defines, if script are going to spawn server side entities or non networked local ones.

useOpacity boolean

This enables or disables the opacity on the full view.

hideHudOnPauseMenu boolean

Hides the HUD (dispatch, radar, plate reader) while the pause menu / map is open.

Statuses

Defines the unit statuses available in dispatch. Each status has a name and a color, and one can be marked as the default.

Payload

---@class Status
---@field name string
---@field color string
---@field default? boolean

Detailed types information

name string

Display name of the status. Usually a locale(...) call for localization.

color string

Color of the status, as a hex string (e.g. #539D1B).

default boolean

If true, this status is applied by default. Only one status should be marked as default.

Quick (mini) dispatch

Payload

---@class QuickDispatchConfig
---@field enabled boolean
---@field allowedGroups string[]
---@field defaultStyle 'old' | 'new'
---@field enabledByDefault boolean

Detailed types information

enabled boolean

Defines if quick dispatch is enabled.

allowedGroups string[]

Defines groups, which are allowed to use quick dispatch.

defaultStyle 'old' | 'new'

Defines default style for quick dispatch. Later players are able to change it ingame.

enabledByDefault boolean

Defines if quick dispatch is enabled by default.

Radar

Payload

---@class RadarConfig
---@field enabled boolean
---@field allowedGroups string[]
---@field allowedVehicleClass number[]
---@field allowedVehicleModels string[]
---@field enabledByDefault boolean
---@field speedUnits 'kmh' | 'mph'
---@field range number
---@field updateInterval number
---@field radarReceipts RadarReceiptConfig

Detailed types information

enabled boolean

Defines if radar is enabled

allowedGroups string[]

Defines groups, which are allowed to use radar.

allowedVehicleClass string[]

Defines vehicle classes which has radar.

allowedVehicleModels string[]

Defines vehicle models which has radar.

enabledByDefault boolean

Defines if radar is enabled by default.

speedUnits 'kmh' | 'mph'

Defines units for radar and other stuff.

range number

The range of entity detection. Uses GTA units.

updateInterval number

The interval in milliseconds, that is used for loop

Radar receipts

Payload

---@class RadarReceiptConfig
---@field enabled boolean
---@field command string
---@field item string

Detailed types information

enabled boolean

Defines if radar receipts is enabled

command string

Command which opens printer menu.

item string

Item, which will be given to player with locked radar metadata

Reader

Payload

---@class ReaderConfig
---@field enabled boolean
---@field allowedGroups string[]
---@field allowedVehicleClass number[]
---@field allowedVehicleModels string[]
---@field enabledByDefault boolean

Detailed types information

enabled boolean

Defines if reader is enabled

allowedGroups string[]

Defines groups, which are allowed to use reader.

allowedVehicleClass string[]

Defines vehicle classes which has reader.

allowedVehicleModels string[]

Defines vehicle models which has reader.

enabledByDefault boolean

Defines if reader is enabled by default.

Keybinds

Detailed types information

fullView string | boolean | nil

Opens full dispatch view. Can be set to false or nil to disable the keybind

componentsDragging string | boolean | nil

Toggle components dragging. Applies to quick dispatch, radar, reader. Can be set to false or nil to disable the keybind

quickDispatchVisibility string | boolean | nil

Toggle quick dispatch visibility. Can be set to false or nil to disable the keybind

quickDispatchRespondToAlert string | boolean | nil

Respond to alert in quick dispatch. Can be set to false or nil to disable the keybind

quickDispatchJoinRadio string | boolean | nil

Join radio channel in quick dispatch. Can be set to false or nil to disable the keybind

quickDispatchJoinUnitRadio string | boolean | nil

Join radio channel for the whole unit in quick dispatch. Can be set to false or nil to disable the keybind

quickDispatchMarkOnGps string | boolean | nil

Mark the alert location on GPS in quick dispatch. Can be set to false or nil to disable the keybind

quickDispatchArchiveAlert string | boolean | nil

Archive the current alert via quick dispatch. Can be set to false or nil to disable the keybind

quickDispatchCompactToggle string | boolean | nil

Toggle compact mode on quick dispatch (hides controls, shows attach status only). Can be set to false or nil to disable the keybind

toggleRadar string | boolean | nil

Toggle radar visibility. Can be set to false or nil to disable the keybind

toggleReader string | boolean | nil

Toggle reader visibility. Can be set to false or nil to disable the keybind

radarLock string | boolean | nil

Radar and reader lock. Can be set to false or nil to disable the keybind

Commands

Payload

---@class CommandsConfig
---@field toggleFullView string | boolean | nil

Detailed types information

toggleFullView string | boolean | nil

Command to open/close full dispatch view. Can be set to false or nil to disable the command

componentsDragging string | boolean | nil

Toggle components dragging. Applies to quick dispatch, radar, reader. Can be set to false or nil to disable the command

quickDispatchVisibility string | boolean | nil

Toggle quick dispatch visibility. Can be set to false or nil to disable the command

quickDispatchRespondToAlert string | boolean | nil

Respond to alert in quick dispatch. Can be set to false or nil to disable the command

quickDispatchJoinRadio string | boolean | nil

Join radio channel in quick dispatch. Can be set to false or nil to disable the command

quickDispatchJoinUnitRadio string | boolean | nil

Join radio channel for the whole unit in quick dispatch. Can be set to false or nil to disable the command

quickDispatchMarkOnGps string | boolean | nil

Mark the alert location on GPS in quick dispatch. Can be set to false or nil to disable the command

toggleRadar string | boolean | nil

Toggle radar visibility. Can be set to false or nil to disable the command

toggleReader string | boolean | nil

Toggle reader visibility. Can be set to false or nil to disable the command

radarLock string | boolean | nil

Radar and reader lock. Can be set to false or nil to disable the command

Call signs

Payload

---@class CallsignConfig
---@field canChange boolean
---@field allowedGroups string[]

Detailed types information

canChange boolean

Defines if callsign change is enabled.

allowedGroups string[]

Allowed groups to change call sign.

Copyright © 2025 Felis Development