General

Details

Below, you will find detailed configuration for general config.

Configuration file

config/general.lua
return {
    -- 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
    },

    ---@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 = 100,

        ---@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',

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

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

        -- 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 keybind
        ---@type string | boolean | nil
        toggleFullView = 'dispatch',
    },

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

    ---@type boolean
    serverSideEntities = false,

    ---This enables or disables the glass effect on the full view.
    --- If you feel any performance hits or flickers, set it to `false`
    ---@type boolean
    useGlassEffect = true,
}

Detailed types information

allowedGroupstable<string>
Defines groups, which are allowed to use dispatch.
requiredDutyGroupstable<string>
Defines group, which requires duty to use dispatch.
sharedBetweenGroupstable<string[]>
Defines groups, which share drawings, units and some other data.
dispatchertable<string, number>
Defines grade, which will be treated as a dispatcher for a certain group.
serverSideEntities boolean
Defines, if script are going to spawn server side entities or non networked local ones.
useGlassEffectboolean
This enables or disables the glass effect on the full view.

Quick (mini) dispatch

Payload

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

Detailed types information

enabledboolean
Defines if quick dispatch is enabled.
allowedGroupsstring[]
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.
enabledByDefaultboolean
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

enabledboolean
Defines if radar is enabled
allowedGroupsstring[]
Defines groups, which are allowed to use radar.
allowedVehicleClassstring[]
Defines vehicle classes which has radar.
allowedVehicleModelsstring[]
Defines vehicle models which has radar.
enabledByDefaultboolean
Defines if radar is enabled by default.
speedUnits'kmh' | 'mph'
Defines units for radar and other stuff.
rangenumber
The range of entity detection. Uses GTA units.
updateIntervalnumber
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

enabledboolean
Defines if radar receipts is enabled
commandstring
Command which opens printer menu.
itemstring
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

enabledboolean
Defines if reader is enabled
allowedGroupsstring[]
Defines groups, which are allowed to use reader.
allowedVehicleClassstring[]
Defines vehicle classes which has reader.
allowedVehicleModelsstring[]
Defines vehicle models which has reader.
enabledByDefaultboolean
Defines if reader is enabled by default.

Keybinds

Detailed types information

fullViewstring | boolean | nil
Opens full dispatch view. Can be set to false or nil to disable the keybind
componentsDraggingstring | boolean | nil
Toggle components dragging. Applies to quick dispatch, radar, reader. Can be set to false or nil to disable the keybind
quickDispatchVisibilitystring | boolean | nil
Toggle quick dispatch visibility. Can be set to false or nil to disable the keybind
quickDispatchRespondToAlertstring | boolean | nil
Respond to alert in quick dispatch. Can be set to false or nil to disable the keybind
quickDispatchJoinRadiostring | boolean | nil
Respond to alert in quick dispatch. Can be set to false or nil to disable the keybind
quickDispatchMarkOnGpsstring | boolean | nil
Respond to alert in quick dispatch. Can be set to false or nil to disable the keybind
toggleRadarstring | boolean | nil
Toggle radar visibility. Can be set to false or nil to disable the keybind
toggleReaderstring | boolean | nil
Toggle reader visibility. Can be set to false or nil to disable the keybind
radarLockstring | 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

toggleFullViewstring | boolean | nil
Command to open/close full dispatch view.

Call signs

Payload

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

Detailed types information

canChangeboolean
Defines if callsign change is enabled.
allowedGroupsstring[]
Allowed groups to change call sign.