Skip to content

Police & Dispatch ​

Police System ​

Require a minimum number of police officers to be online before a box can be opened.

lua
Config.police = {
    enabled      = true,
    jobNames     = { 'police' },
    minCount     = 0,
    notifyPlayer = true,
}
OptionPurposeDefault
enabledEnable/disable the police count system entirelytrue
jobNamesJob names that count as police (must match your server's job names){ 'police' }
minCountGlobal minimum police required (0 = no requirement)0
notifyPlayerTell the player when there aren't enough police onlinetrue

Multiple Police Jobs ​

If your server has multiple police-type jobs:

lua
Config.police.jobNames = { 'police', 'sheriff', 'highway' }

All listed jobs are counted together toward the minimum.


Dispatch System ​

Alert police when a box is opened.

lua
Config.dispatch = {
    enabled   = false,
    chance    = 100,
    system    = 'default',
    eventName = 'Box Opened',
    blip = {
        sprite    = 788,
        color     = 75,
        scale     = 1.0,
        alpha     = 1.0,
        timeout   = 60,
        showRadar = true,
    },
}
OptionPurposeDefault
enabledEnable dispatch alerts when a box is openedfalse
chancePercentage chance (0-100) of triggering an alert100
systemWhich dispatch system to use'default'
eventNameAlert title shown in the dispatch UI'Box Opened'

Blip Settings ​

OptionPurposeDefault
blip.spriteGTA blip sprite ID788
blip.colorGTA blip color ID75
blip.scaleBlip size on the map1.0
blip.alphaBlip opacity1.0
blip.timeoutSeconds before the blip disappears60
blip.showRadarFlash the blip on the minimaptrue

Supported Dispatch Systems ​

system ValueResourceMethod
'default'Built-inSends a blip directly to online police players
'ps-dispatch'ps-dispatchexports['ps-dispatch']:CustomAlert(...)
'cd-dispatch'cd_dispatchTriggerServerEvent('cd_dispatch:AddNotification', ...)
'core-dispatch-old'core_dispatch (older)TriggerServerEvent('core_dispatch:addCall', ...)
'core-dispatch-new'core_dispatch (newer)exports['core_dispach']:addCall(...)

Additional Dispatch Options ​

For external dispatch systems, you can also set:

lua
Config.dispatch.policeCode  = '10-90'
Config.dispatch.description = 'Lootable box has been opened'

Robicore