QBCore Installation

QBCore-specific setup for oxide-dispatch.

QBCore-specific setup for oxide-dispatch.

Requirements

  • qb-core
  • ox_lib
  • oxmysql
  • o-link
  • oxide-dispatch
  • oxide-police (optional but recommended for full LEO duty / MDT integration)

Start oxide-dispatch after o-link and before oxide-police.

Startup Order

ensure oxmysql
ensure ox_lib
ensure qb-core
ensure [standalone]
ensure [voice]
ensure o-link
ensure oxide-dispatch
ensure oxide-police

If your server uses folder ensures, make sure the effective load order still starts o-link before oxide-dispatch.

SQL

Run the dispatch SQL before starting the resource:

resources/[oxide]/oxide-dispatch/sql/install.sql

This creates:

  • dispatch_alerts
  • dispatch_responders

QBCore Job Names

Dispatch sends alerts to framework jobs listed in:

oxide-dispatch/shared/config/jobs.lua

Default police responder jobs:

police = {
    jobs = { 'police', 'lspd', 'bcso', 'sasp', 'sheriff', 'statetrooper',
             'LSPD', 'BCSO', 'SASP' },
    ...
}

Every job name used by an Oxide Police department must also exist in qb-core/shared/jobs.lua. Job-name matching is case-sensitive — include each casing your server actually uses.

Examples:

  • Oxide department police requires QBCore job police
  • Oxide department lspd requires QBCore job lspd
  • Oxide department bcso requires QBCore job bcso
  • Oxide department sasp requires QBCore job sasp

QBCore Compatibility Shim

A compatibility shim is a small built-in translator: it listens for the alert events older scripts already send and converts them into Oxide Dispatch alerts, so you don't have to edit those scripts.

oxide-dispatch includes a QBCore shim at:

oxide-dispatch/server/compat/qb-core.lua
oxide-dispatch/client/compat/qb-core.lua

It listens for the legacy QB police-alert and ambulance-alert events:

TriggerServerEvent('police:server:policeAlert', message)
TriggerServerEvent('hospital:server:ambulanceAlert', message)   -- qb-ambulancejob / qbx_ambulancejob death & laststand
TriggerServerEvent('hospital:server:emergencyAlert')            -- QBX radial menu fast path

Note on /911e: the /911e command does NOT go through hospital:server:ambulanceAlert — qb-ambulancejob and qbx_ambulancejob send it straight to on-duty EMS clients via hospital:client:ambulanceAlert, so the shim never sees it. To capture /911e in Oxide Dispatch, enable clientAmbulanceAlert in the shim config and emit oxide:dispatch:compat:qb-core:clientAmbulanceAlert from your own bridge script.

Those alerts are converted into Oxide Dispatch alerts automatically. Keyword rules in Config.Compatibility['qb-core'].keywordCodes look at the words in the alert message and pick a matching dispatch code (for example, a message containing "store" becomes a 10-91 Store Robbery); ambulance alerts default to 10-52 (Medical Emergency).

The shim is configured in:

oxide-dispatch/shared/config/compat.lua

Useful options:

Config.Compatibility['qb-core'] = {
    enabled = true,
    serverPoliceAlert = true,
    clientPoliceAlert = false,
    ambulanceAlert = true,        -- hospital:server:ambulanceAlert
    emergencyAlert = true,        -- hospital:server:emergencyAlert (QBX radial)
    clientAmbulanceAlert = false, -- client-side ambulance relay
    emsJobs = 'ems',              -- group/jobs the converted ambulance alert is addressed to
    emsCode = '10-52',
    jobs = 'police',
    defaultCode = '10-31',
    rateLimitMs = 5000,
    mirrorQbPhone = false,        -- set true to ALSO trigger qb-phone:client:addPoliceAlert
}

When Config.Detection.Death.enabled and ambulanceAlert are both on, a player death would normally produce two alerts — the shared rateLimitMs cooldown swallows the duplicate. If you set rateLimitMs = 0, disable one of the two or EMS will get double alerts on every death.

jobs = 'police' means the alert uses the police responder group from shared/config/jobs.lua.

Mirroring to qb-phone

If you still rely on qb-phone for the police alert UI alongside Oxide Dispatch, enable the mirror:

Config.Compatibility['qb-core'].mirrorQbPhone = true

When enabled, the shim will additionally trigger qb-phone:client:addPoliceAlert on each resolved recipient.

Existing QB Resources

Most QBCore robbery/drug scripts call:

TriggerServerEvent('police:server:policeAlert', message)

No edits are required for those alerts when the shim is enabled.

The shim does not support old QB evidence events. Oxide Police has its own evidence system. Unsupported old events include:

evidence:server:CreateFingerDrop
evidence:server:CreateBloodDrop
evidence:client:SetStatus

Remove those calls or leave them unused after qb-policejob is disabled.

When oxide-police is installed, disable conflicting QB resources:

  • qb-policejob — replaced by oxide-police
  • Any custom MDT that listens to the same dispatch events

Testing

Start oxmysql, ox_lib, qb-core, o-link, oxide-dispatch, and oxide-police.

Confirm no qb-policejob resource is running.

Clock an officer into Oxide Police.

Trigger a legacy alert from a QB robbery/drug script.

Confirm the alert appears in Oxide Dispatch for on-duty police responders.

You can also use:

/testdispatch 10-71 police

Run it from the server console, or grant in-game admins the permission first by adding add_ace group.admin command.testdispatch allow to your server.cfg — without that permission, the in-game command silently does nothing.

Additional smoke tests:

  • /911 robbery in progress from a citizen — should reach on-duty police
  • /panic from an on-duty officer — should reach colleagues
  • Press G on a popup — should accept the alert and drop a waypoint
  • Press F4 — should trigger panic with a 60s cooldown

Next Steps