# qb-policejob

`qb-policejob` provides the official QBCore police gameplay resource: duty/location interactions,
police equipment and armory flows, cuff/escort interactions, evidence handling, vehicle impound
integration, cameras/radars, anklet tracking and police commands.

It is **not** an all-in-one MDT or dispatch product. If your server has an MDT/dispatch system, that
is a separate resource/integration unless your deployed fork explicitly adds it.

## Key configuration

Current official documentation exposes settings including:

```lua
Config.LicenseRank = 2
Config.HandCuffItem = 'handcuffs'
Config.PoliceHelicopter = 'POLMAV'
```

`Config.LicenseRank` controls the minimum police grade that can manage licenses.

The resource also configures location groups such as duty, vehicle, stash, impound, helicopter,
armory, trash, fingerprint and evidence positions. Copy coordinates from the current
`config.lua` you deploy rather than from an old guide.

## Weapon-license commands

Current QBCore documentation lists:

```text
/grantlicense [id] [license]
/revokelicense [id] [license]
```

Example:

```text
/grantlicense 12 weapon
/revokelicense 12 weapon
```

The police officer must meet `Config.LicenseRank`.

See [Weapon License](/docs/guides/weapon-license) for the complete metadata → City Hall → shop flow.

## Common police commands

The current upstream documentation also includes commands for police workflows such as:

- `/911p [message]`
- `/spikestrip`
- `/cuff`
- `/sc`
- `/clearblood`
- `/seizecash`
- `/cam [id]`
- `/flagplate [plate] [reason]`
- `/unflagplate [plate]`
- `/depot [price]`
- `/impound`
- `/anklet`
- `/ankletlocation [cid]`
- `/takedrivinglicense`
- `/takedna [id]`

Command availability can move as the repository evolves. Verify against the exact commit deployed on
your server.

## Evidence system

The official resource handles evidence gameplay such as blood, fingerprints and casings. Treat the
resource's own server handlers and database/config files as authoritative.

Do not add custom SQL tables like `police_reports`, `police_alerts` or `police_evidence` unless
the resource/fork you actually deploy ships and reads them.

## Armory and inventory

The resource integrates police equipment with QBCore inventory behavior. Inventory APIs belong to
your installed inventory resource; use [qb-inventory](/docs/resources/qb-inventory) exports rather
than inventing policejob inventory exports.

When changing armory contents:

1. Confirm every item exists in shared items.
2. Keep job/grade checks server authoritative.
3. Do not trust a client-supplied item name, price or quantity.
4. Test add/remove behavior with the exact inventory revision you run.

## Impound and garages

Police impound behavior integrates with the QBCore vehicle/garage ecosystem. The current upstream
resource contains police impound commands; garage storage rules live in
[qb-garages](/docs/resources/qb-garages).

Avoid copying database mutations from a custom garage fork into qb-policejob without checking the
current `player_vehicles` schema.

## Safe customization

Prefer changing documented config and shared definitions first. When adding a network event:

```lua
RegisterNetEvent('my-police:server:action', function(targetId)
    local src = source
    local Officer = exports['qb-core']:GetPlayer(src)
    if not Officer then return end

    if Officer.PlayerData.job.name ~= 'police' or not Officer.PlayerData.job.onduty then
        return
    end

    -- Validate target, distance and the requested action server-side.
end)
```

See [Safe Server Events](/docs/security/safe-server-events).

If you would rather replace the job than extend it, compare
[police job scripts on RPScripts](https://rpscripts.net/product-category/fivem-job-scripts/police-scripts/) by declared
QBCore support and dependencies. RPScripts and qbcore.net are operated by the same owner.

## Troubleshooting

| Symptom | Check |
| --- | --- |
| Police interaction missing | Job name, duty state, configured location and required dependency state. |
| License command denied | Police grade versus `Config.LicenseRank`. |
| Armory item missing | Shared item definition and inventory resource/API. |
| Impound behaves incorrectly | qb-policejob command path plus qb-garages/player_vehicles compatibility. |
| Copied export is nil | Confirm that export actually exists in current qb-policejob source; do not rely on fork docs. |

## Sources

- [qb-policejob repository](https://github.com/qbcore-fivem/qb-policejob)
- [Official qb-policejob documentation](https://github.com/qbcore-framework/qb-docs/blob/main/qbcore-resources/qb-policejob.md)
- [Current QBCore command reference](https://github.com/qbcore-framework/qb-docs/blob/main/qb-core/commands.md)

Verified against current upstream documentation/source on **2026-09-27**.
