Studios
Evidencehouse-3.jpg

Installation

SoonEvidenceQbox
PAGE 02 OF 06  ·  OVERVIEW → INSTALLATION → CONFIGURATIONdocs.glitchstudios.dev
Browse docs

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#

  1. Put the glitch-evidence folder in your resources folder. The folder name is case-sensitive and must stay glitch-evidence.

  2. Add the two items from install/items.lua to ox_inventory/data/items.lua, and put empty_evidence_bag.png and filled_evidence_bag.png in ox_inventory/web/images. The item names must match Config.Bag.

  3. Database: nothing to do on most servers. The glitch_evidence table is created when the resource starts, and the bucket column is added to older tables. If your database user cannot create tables, run sql/install.sql once by hand.

  4. Add to server.cfg, after ox_lib, oxmysql, qbx_core, ox_inventory and ox_target:

    ensure glitch-uiElements
    ensure glitch-evidence
    

    glitch-uiElements is optional. Leave that line out if you do not use it and set Config.KeyHud = 'ox_lib'.

  5. Connect your sources. Paste the hooks from install/qbx_police.lua into qbx_police, or call the server exports from your own scripts. See Commands & Exports.

  6. Check Config.JobType in config.lua. The default leo is the job type, not the job name, so every police job with that type can sweep.

  7. 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_cartridge item in install/items.lua is 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.