General
Details
Below, you will find detailed configuration for general config.
Configuration file
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
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.
serverSideEntities boolean Defines, if script are going to spawn server side entities or non networked local ones.
useGlassEffect boolean 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
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 Respond to alert in quick dispatch. Can be set to false or nil to disable the keybind
quickDispatchMarkOnGps string | boolean | nil Respond to alert in quick dispatch. 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.
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.