Requirements#
The server
| Framework | qbx_core (Qbox). ESX and plain QBCore are not supported. |
| Resources | ox_lib, oxmysql, ox_target, ox_inventory |
| Server | OneSync enabled |
| Database | MariaDB or MySQL through oxmysql. The glitch_evidence table is created on start. |
| Optional | glitch-uiElements for the key hint while sweeping (without it the hint uses ox_lib). qbx_police and a taser script as evidence sources. |
Tested with qbx_core 1.24.0, ox_inventory 2.48.0, ox_lib 3.40.0, ox_target 1.17.2 and oxmysql 2.14.2.
Installation steps#
Put the
glitch-evidencefolder in your resources folder. The folder name is case-sensitive and must stayglitch-evidence.Add the two items from
install/items.luatoox_inventory/data/items.lua, and putempty_evidence_bag.pngandfilled_evidence_bag.pnginox_inventory/web/images. The item names must matchConfig.Bag.Database: nothing to do on most servers. The
glitch_evidencetable is created when the resource starts, and thebucketcolumn is added to older tables. If your database user cannot create tables, runsql/install.sqlonce by hand.Add to
server.cfg, after ox_lib, oxmysql, qbx_core, ox_inventory and ox_target:ensure glitch-uiElements ensure glitch-evidenceglitch-uiElementsis optional. Leave that line out if you do not use it and setConfig.KeyHud = 'ox_lib'.Connect your sources. Paste the hooks from
install/qbx_police.luainto qbx_police, or call the server exports from your own scripts. See Commands & Exports.Check
Config.JobTypeinconfig.lua. The defaultleois the job type, not the job name, so every police job with that type can sweep.Restart the server. Give an officer a flashlight and an empty evidence bag, hold the flashlight, aim with the right mouse button and sweep a scene.
There are no permission lines to add. Access depends on the player's job type and duty status.
[!NOTE] The
taser_cartridgeitem ininstall/items.luais optional. It only supplies the picture on AFID tag cards (Config.AfidImage).
Updating#
Back up config.lua and locales/en.json, replace the other files, merge any new keys into your config and restart the resource. Database changes apply themselves and stored evidence is kept.