QBCore Installation

Install oxide-police on QBCore with oxide-dispatch — items, weapons, jobs, and the QBCore compatibility shim.

This guide explains how to install oxide-police on QBCore with oxide-dispatch.

Requirements

  • qb-core
  • qb-inventory
  • a targeting resource supported by o-link (qb-target or ox_target)
  • ox_lib
  • oxmysql
  • o-link
  • screenshot-basic
  • oxide-dispatch (powers the MDT Dispatch tab; set Config.MDT.dispatchEnabled = false if you run ps-dispatch / cd_dispatch / qs-dispatch / etc.)
  • oxide-police

Optional but recommended:

  • oxide-banking
  • pma-voice

Disable Legacy QB Police Resources

Do not run qb-policejob with oxide-police.

If you are using the Oxide prison/custody system, also disable qb-prison.

Recommended disabled location:

resources/[disabled]/qb-policejob
resources/[disabled]/qb-prison

If your server uses:

ensure [qb]

moving those folders out of resources/[qb] is the cleanest way to prevent them from starting.

Startup Order

Recommended order:

ensure oxmysql
ensure ox_lib
ensure qb-core
ensure [standalone]
ensure [voice]
ensure screenshot-basic
ensure o-link
ensure oxide-banking    # optional — fine invoicing and department treasury
ensure oxide-dispatch   # optional — powers the MDT Dispatch tab
ensure oxide-police

o-link must start before oxide-police.

oxide-dispatch should start before oxide-police if the MDT dispatch tab is enabled.

The oxide-banking and oxide-dispatch lines are optional — leave them out if you do not run those resources.

SQL

Run the police SQL before starting the resource:

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

Do not run reset.sql unless you intentionally want to drop the Oxide Police database tables.

QBCore Jobs

Oxide Police sets the player's QBCore job to the Oxide department name.

That means every Oxide department name must exist as a QBCore job in:

resources/[qb]/qb-core/shared/jobs.lua

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

Each law enforcement job should use:

type = 'leo'
defaultDuty = false

defaultDuty = false prevents QBCore from treating officers as on duty before they clock in through Oxide Police.

QBCore Items

Register these items in:

resources/[qb]/qb-core/shared/items.lua

Required item names:

weapon_radar
body_cam
police_radio
megaphone
evidence_camera
breathalyzer
cctv_camera
prison_food_tray
ziptie
scissors
wheel_clamp
mouthtape
tracking_band
headbag
lockpick
evidence_blood
evidence_bullet
evidence_fingerprint

Copy item images from:

resources/[oxide]/oxide-police/items

to:

resources/[qb]/qb-inventory/html/images

Every image file is named after its item (the body_cam item's image is body_cam.png).

weapon_radar.png ships with oxide-police in the items/ folder along with the rest of the icons — copy it into qb-inventory/html/images like the others and the example below will pick it up.

Handheld Speed Radar

Oxide Police includes a streamed addon weapon for the handheld radar gun:

WEAPON_RADAR

On QBCore, register the weapon inventory item in:

resources/[qb]/qb-core/shared/items.lua

Example:

weapon_radar = {
    name = 'weapon_radar',
    label = 'Speed Radar',
    weight = 1000,
    type = 'weapon',
    ammotype = nil,
    image = 'weapon_radar.png',
    unique = true,
    useable = false,
    description = 'A handheld police speed radar'
}

Also register the weapon hash in:

resources/[qb]/qb-core/shared/weapons.lua

Example:

[`weapon_radar`] = {
    name = 'weapon_radar',
    label = 'Speed Radar',
    weapontype = 'Miscellaneous',
    ammotype = nil,
    damagereason = 'Died'
}

oxide-police/fxmanifest.lua must include the radar stream setup:

data_file 'WEAPONINFO_FILE'        'stream/meta/weapons.meta'
data_file 'WEAPON_METADATA_FILE'   'stream/meta/weaponarchetypes.meta'
data_file 'WEAPON_ANIMATIONS_FILE' 'stream/meta/weaponanimations.meta'
data_file 'PED_PERSONALITY_FILE'   'stream/meta/pedpersonality.meta'

The radar model (w_pi_radar.ydr + w_pi_radar.ytd) is streamed automatically from oxide-police/stream/.

The radar item can be added to an Oxide Police armory loadout as:

weapon_radar

The handheld radar only activates when the officer equips WEAPON_RADAR and is on duty. The vehicle radar system is separate: fleet vehicles must have has_radar enabled in the Oxide Police fleet setup.

QBCore Compatibility Shim

oxide-police includes a QBCore compatibility shim:

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

It provides compatibility for background QB integrations:

  • police:GetCops
  • police:GetDutyPlayers
  • police:server:IsPoliceForcePresent
  • police:server:isPlayerDead
  • police:IsSilencedWeapon
  • police:server:UpdateCurrentCops
  • police:SetCopCount
  • exports['qb-policejob']:IsHandcuffed()
  • police:server:SetHandcuffStatus — legacy revive-uncuff bridge so QBCore hospital/ambulance scripts can clear a player's cuffs when reviving them. For safety it only ever clears cuffs (never applies them) and only while the player is in the death/downed state, so no one can fire it to free themselves.

oxide-police also uses:

provide 'qb-policejob'

This allows resources that call exports['qb-policejob']:IsHandcuffed() to keep working after the old qb-policejob resource is disabled.

What The Shim Does Not Support

The shim does not remap old QB police action events.

Unsupported examples:

police:client:CuffPlayer
police:client:CuffPlayerSoft
police:client:EscortPlayer
police:client:JailPlayer
police:server:CuffPlayer
police:server:JailPlayer
police:server:SearchPlayer
police:server:RobPlayer

Use Oxide Police's own action menu instead.

For evidence, the shim supports one legacy event: evidence:server:CreateFingerDrop, used by QB robbery scripts to leave fingerprints at a scene. Those drops are routed into Oxide Police's own evidence system automatically, so robbery scripts keep working without changes.

Other old QB evidence events are not supported because Oxide Police has its own evidence system:

evidence:server:CreateBloodDrop
evidence:client:SetStatus

Initial In-Game Setup

After SQL is installed and the server starts:

Make sure your account is a server admin (in a group with the admin permission — see Admin → Permissions). The same admin setup that works for your other Oxide resources works here.
Open /padmin.
Create or verify a department.
Make sure the department name matches a QBCore job name.
Add grades that match the QBCore job grade numbers.
Add at least one station with a clock-in point.
Add radio channels if using Oxide Police radio.
Add garages and vehicles if testing fleet features.
Add custody/prison points if testing jail.
Hire a test officer into the department.
Clock in through Oxide Police before testing dispatch, MDT, evidence, fleet, or prison.

Testing

Confirm qb-policejob is not running.

Confirm qb-prison is not running if using Oxide prison.

Start oxide-dispatch.

Start oxide-police.

Clock in as an Oxide Police officer.

Trigger a QB robbery/drug police alert.

Confirm Oxide Dispatch receives the alert.

Confirm QB robbery scripts receive police:SetCopCount.

Confirm exports['qb-policejob']:IsHandcuffed() returns a boolean without errors.

Add weapon_radar to an armory loadout, equip it on duty, and confirm the handheld radar overlay appears while aiming at a vehicle.

Mark a fleet vehicle as radar-equipped and confirm the vehicle radar keybind works from that vehicle.

Next Steps