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-coreqb-inventory- a targeting resource supported by
o-link(qb-targetorox_target) ox_liboxmysqlo-linkscreenshot-basicoxide-dispatch(powers the MDT Dispatch tab; setConfig.MDT.dispatchEnabled = falseif you run ps-dispatch / cd_dispatch / qs-dispatch / etc.)oxide-police
Optional but recommended:
oxide-bankingpma-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-prisonIf 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-policeo-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.sqlDo 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.luaExamples:
- Oxide department
policerequires QBCore jobpolice - Oxide department
lspdrequires QBCore joblspd - Oxide department
bcsorequires QBCore jobbcso - Oxide department
sasprequires QBCore jobsasp
Each law enforcement job should use:
type = 'leo'
defaultDuty = falsedefaultDuty = 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.luaRequired 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_fingerprintCopy item images from:
resources/[oxide]/oxide-police/itemsto:
resources/[qb]/qb-inventory/html/imagesEvery 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_RADAROn QBCore, register the weapon inventory item in:
resources/[qb]/qb-core/shared/items.luaExample:
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.luaExample:
[`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_radarThe 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.luaIt provides compatibility for background QB integrations:
police:GetCopspolice:GetDutyPlayerspolice:server:IsPoliceForcePresentpolice:server:isPlayerDeadpolice:IsSilencedWeaponpolice:server:UpdateCurrentCopspolice:SetCopCountexports['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:RobPlayerUse 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:SetStatusInitial In-Game Setup
After SQL is installed and the server starts:
admin permission — see Admin → Permissions). The same admin setup that works for your other Oxide resources works here./padmin.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.