Skip to content

About

Police for every law enforcement job on Qbox, for FiveM for GTAV Enhanced. A port of qbx_policejob.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dps_police

Police for Qbox servers on FiveM for GTAV Enhanced.

Credit

This is a port of qbx_policejob by the Qbox Project, taken from its main branch at commit 7fa438f (2026-09-26). Their code is the base of this resource, and it is licensed GPL-3.0, as this resource is.

What it does

  • On and off duty, armory, evidence locker, job vehicles and helicopters.
  • Handcuffs (as an item or a command), soft cuffs, escort, search.
  • Evidence: bullet casings, blood drops, fingerprints, gunshot residue, evidence bags.
  • Fines, speed radars, plate flags, impound and depot.
  • Jail, ankle tracker, security cameras.
  • Road objects: cones, barriers, signs, lights, spike strips.

It works for every law enforcement job, not only police. Any job whose type is leo counts. With dps_jobs that is LSPD, BCSO, SASP, FIB, DOC, DFW and the Coast Guard.

Cop car trunks

The game's own traffic police cars are locked to players and cannot be stolen (dps_vehiclekeys). Their trunk can still be broken into:

  • Stand at the trunk of a traffic police, police2, police3, sheriff or sheriff2 and choose Break into trunk on the eye. You need a lockpick.
  • Pick the lock (the dps_minigames lockpick, or the ox_lib skill check without it). Fail, and the lockpick can break.
  • Then a few seconds searching. Every trunk holds one or two boxes of police ammo (9mm, shotgun shells, sometimes rifle rounds). About one trunk in ten also holds a police gun: a combat pistol most often, a pump shotgun less, a carbine rifle rarely.
  • A trunk is empty after one robbery. A new traffic car has a new trunk.
  • Half the time the break-in sends "Police vehicle broken into" to on-duty officers, and always when an officer is sitting in the car.
  • A player officer's own car (one a script made) is never offered.

What is inside and how often: copTrunk in config/server.lua. Which cars, the item, how hard the lock is: copTrunk in config/shared.lua. Not yet seen in game.

What we changed from qbx_policejob

  • Fines no longer need a banking script. Before, a server without Renewed-Banking threw an error after the player had already been charged. Now the fine is taken either way, and it is banked to the department only if Renewed-Banking is running.

  • Security fixes (0.1.1).

    • The helicopter camera and the fingerprint scanner now write what they show as plain text. Before, a crafted number plate could run code in the screen of the officer looking at it.
    • Fingerprint scans are checked by the server. Only an on-duty officer can start one, only on someone standing next to them, and the result goes only to the two players in that scan. Before, any player could open the scanner on any other player.
    • The screen ignores messages that are not its own.
  • Taking a player's cash is checked by the server (0.1.2). Robbing a player and seizing a suspect's cash both move all of that player's cash. Before, the server checked only that the two players were standing close: any player with a changed game could take anyone's cash. Now:

    • Seizing cash needs an on-duty officer.
    • Both need the other player to be cuffed, dead, or have their hands up. The server reads that itself and does not take the asking player's word for it.
    • Both refuse a request aimed at yourself, at a player in another world, or repeated within five seconds.
    • The money bag or the cash is only handed over if the cash really left the other player.
  • Every call to police goes to the dispatch board (0.2.0). Before, each alert sent its own message straight to officers' games and nothing reached the board. Now a 911 call, an alert another script asks for, a flagged plate and an officer going down all take one road. Each lands on the board through dps_core, and each on-duty officer still gets a notice and a map blip.

    • A call is always where the caller is. Before, a player's game could name any player as the place of the call.
    • The words are cleaned. What a player types reaches officers' screens as plain text only.
    • Calls cannot be flooded. One 911 call every 30 seconds for each player, and limits on the others.
    • A flagged plate is checked by the server against its own list before a call goes out.
    • An officer going down raises a call by itself, at top priority. The server writes it from its own record of who the officer is. Before, nothing on a DPS server raised this call at all.
  • Police reports what it does (0.3.0). Each fine, jailing, cash seizure and impound is reported once to dps_core, after the server has checked it and done it. A records screen, a log or a jail script can listen there, and this script never has to change for them. A player's game cannot fake a report.

    Report Sent when Details
    police.fine A fine or a bill is paid officer, citizen, amount, reason, notes
    police.jail A player is jailed officer, citizen, months
    police.cash_seized An officer seizes cash officer, citizen, amount
    police.impound A vehicle is impounded officer, plate, owned, seized, price, where

    Officer and citizen are citizen IDs. Nothing is stored by this script.

  • Fines work, and take one road (0.4.0). Before, a fine was taken from the player and then paid to a banking script by name. On a server without that script the payment failed and the player was refunded, so no fine could ever be issued.

    • A fine, a bill and a speed camera fine now all pay into a department's account through dps_core. No banking script is named.
    • The money goes to the officer's own department: a sheriff's fine pays the sheriff's account. A speed camera pays police.
    • If the money cannot be banked, the player gets it back. A fine never just vanishes.
    • A bill now needs the officer on duty, and its amount is checked the same way as a fine's.
    • A speed camera fine must be one of the fines in the config.
  • The ankle tracker is made safe (0.3.1).

    • Only an on-duty officer can fit or remove one. Before, any player standing close could.
    • The server reads where a tracked player is from its own copy of them. Before, the tracked player's own game reported the place and named who to tell, so it could send any position to any player.
    • Fitting or removing one is reported as police.tracker.
    • The last two calls to the old phone script are gone: the tracker alert, and a billing mail that nothing ever sent. This script no longer names any phone.

Install

  1. Put this folder in resources/[dps]/.
  2. Do not run qbx_policejob as well. This resource answers to its name.
  3. ensure dps_police after qbx_core and ox_inventory.

Needs ox_lib, oxmysql, qbx_core and ox_inventory.

It works with these other DPS resources:

Resource What it does for police
dps_core Calls to the dispatch board, the department account that fines are paid into, and reports
dps_jail Holds a prisoner for the sentence. /jail hands them over with no other set-up.
dps_lib The cuff and speed camera sounds

These items must exist in ox_inventory: handcuffs, empty_evidence_bag, filled_evidence_bag, heavyarmor, police_stormram.

Commands

Command What it does
/cuff, /sc Cuff or soft cuff the nearest player
/escort Escort the nearest player
/jail [id] [time], /unjail [id] Send to or release from jail
/fine Fine a citizen within 5 metres
/seizecash Seize the nearest player's cash
/callsign [text] Set your callsign
/spikestrip Place a spike strip
/pobject [cone/barrier/roadsign/tent/light/delete] Place or remove a road object
/flagplate [plate] [reason], /unflagplate [plate], /plateinfo [plate] Flag, unflag or check a plate
/depot [price], /impound Depot a vehicle for a fee, or impound it for good
/anklet, /ankletlocation [citizenId] Fit a tracker, or find one
/takedna [id] Take a DNA sample
/clearcasings, /clearblood Clear evidence nearby
/cam [cam] View a security camera
/grantlicense, /revokelicense Give or take a licence
/paytow [id], /paylawyer [id] Pay a tow driver or a lawyer
/911p [message] Anyone: send a report to the police

Change it

  • config/shared.lua: stations, garages, armory, radar fines, the top fine allowed.
  • config/client.lua: job vehicles, their liveries and extras.
  • config/server.lua: which rank can give licences, tow and lawyer pay, what a cop car trunk holds.

About

Police for every law enforcement job on Qbox, for FiveM for GTAV Enhanced. A port of qbx_policejob.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages