Studios
Criminal Tablethouse-3.jpg

Installation

SoonCriminal TabletQbox
PAGE 02 OF 08  ·  OVERVIEW → INSTALLATION → CONFIGURATIONdocs.glitchstudios.dev
Browse docs

Requirements#

Framework qbx_core (Qbox). The tablet does not run on ESX or QBCore.
Server A FiveM artifact with OneSync enabled.
Resources ox_lib, ox_target, ox_inventory and oxmysql. All five required resources are declared in dependencies in the manifest.
Database MariaDB 10.3 or newer, or MySQL 8, through oxmysql.
Optional Each of these is checked at run time and the matching feature is skipped when it is not running. See the table below.

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.

Optional resources#

Resource What it adds
ps-dispatch Heat from dispatch alerts a player causes, and police alerts for boosts, drops and laundering
rc-interactions NPC dialogue flows for contacts, the boost buyer, the Black Market dealer and the money man (flows in rc-interactions/). Without it the tablet opens straight away or a plain dialog shows
glitch-admin The action log (Logs tab and Discord), a role permission for the Admin tab, Discord roles for the crew talkie bypass, and its global testing mode
glitch-bridge The crew talkie check (Config.CrewVoice), which needs glitch-admin too
glitch-uiElements The boosting and wash admin menus (Admin tab, World) and the job complete screen
glitch-xpSystem Boosting and dealing XP, levels and skill tree perks
glitch-minigames The minigames for the tracker disabler and vehicle tracker hacks
glitch-crafting Blueprints at the Fence, the crew Blueprints panel, crafting benches on the upgraded tablet
glitch-drugSales, glitch-drugs Drug sales that count toward contact gates and turf pressure
qbx_vehicles, qbx_vehiclekeys VIN-scratched cars and keys for boost cars
glitch-garages, glitch-emsgarage, glitch-towing Crew garages, EMS tracker checks, flagged boost cars for police towing
glitch-lootBox, glitch-economy Mystery items at the Fence, and the server crime ledger
omes_banking Gang fund accounts for crews tied to a Qbox gang (Config.Crews.fundProvider)
mm_radio A locked gang radio channel when a crew's turf is approved
sd-phone The Black Market dealer's phone number and texts
MugShotBase64 Contact headshots taken in the city by tablet admins
glitch-pauseMenu Blip names on its map legend
G&N Studios Illegal Maps and Warehouses MLOs Needed by the wash network machines in El Burro Heights

Robbery and heist resources (glitch-houserobbery, glitch-storeRobbery, glitch-atmRobbery, glitch-bankRobbery, glitch-truckRobbery, glitch-humaneHeist, glitch-casinoHeist and others) report their jobs to the tablet. A contract whose script is not started is hidden from the board and cannot be claimed, so a server without those products only sees the courier and boost missions. Start the script and its contracts appear on their own.

Installation steps#

  1. Copy the glitch-criminaltablet folder into your resources folder. The folder name is case-sensitive and has a hyphen. Event names use an underscore (glitch_criminaltablet:).

  2. Add the items. Copy the entries you do not have from install/items.lua into ox_inventory/data/items.lua, put a matching .png for each into ox_inventory/web/images, then restart ox_inventory. The package has no item images, so use your own. Dirty money uses your existing black_money item.

    ['glitch_tablet'] = {
        label = 'Criminal Tablet',
        weight = 800,
        stack = false,
        consume = 0,
        close = true,
        description = 'A ruggedised tablet loaded with underworld contacts.',
        server = { export = 'glitch-criminaltablet.useTablet' },
    },
    
    ['contraband_package'] = {
        label = 'Sealed Package',
        weight = 1500,
        stack = false,
        close = true,
        description = 'Taped shut. You were told not to open it.',
    },
    

    install/items.lua also lists fake_plate, tracker_disabler (boosting), glitch_tablet2 (the upgraded tablet), money_bag and keycard_moneywash (the wash network).

  3. Database. Every table is created and upgraded when the resource starts. If your database user cannot create tables, run install/glitch_criminaltablet.sql once by hand.

  4. Add the resource to server.cfg, after its requirements and after any optional resource you want it to talk to:

    ensure ox_lib
    ensure oxmysql
    ensure qbx_core
    ensure ox_inventory
    ensure ox_target
    ensure glitch-criminaltablet
    
  5. Admin tab. Give your staff one of the aces in Config.AdminAces (config/server.lua), for example:

    add_ace group.admin command.criminaltabletadmin allow
    
  6. Check the optional features that are on in the package and turn off the ones you cannot run:

    • Config.WashNetwork.enabled (config/washnetwork.lua) is 'auto' and only runs while the G&N MLOs are started.
    • Config.BlackMarket.phone.enabled (config/blackmarket.lua) is 'auto' and only runs while sd-phone is started.
    • Config.Turf.gangTie (config/turf.lua) changes Qbox gangs (see the note below).
    • Config.CrewVoice (config/server.lua) only runs while glitch-bridge and glitch-admin run. Set your own staffCategory, or ''.
  7. rc-interactions (optional). Open /interactioneditor, import the JSON files from this resource's rc-interactions/ folder and press Save. The tablet finds each flow by name, so no config change is needed.

  8. Start the server, give yourself a glitch_tablet and use it. Walk the contact spots in config/contracts.lua and place laundering spots from the Admin tab (World, Add where I stand).

The console warns at start when the tablet item or the courier package is missing from ox_inventory. Set Config.Debug = true in config/general.lua for detailed logs.

[!WARNING] Two optional features write outside this resource's own tables, and both are on in the package. With Config.Turf.gangTie.allowCustom, a gang name that does not exist yet is created with qbx_core's CreateGangs, which saves it into qbx_core/shared/gangs.lua. With Config.BlackMarket.phone, the Black Market dealer's number is added to the sd-phone phone_contacts table. Turn them off if you do not want that, and take a database backup before going live.

What the resource writes outside its own tables#

  • Qbox gangs: with gangTie.enabled, approving a crew's turf puts its members in a Qbox gang through qbx_core exports.
  • phone_contacts (sd-phone): the Black Market dealer's number is added for players who earn it, and his picture is set on it.
  • omes_banking society accounts: with fundProvider = 'omes_banking', a crew tied to a gang banks with that gang's account, and its history is read from banking_society_transactions.
  • Read only: players (character names and deleted characters) and crafting_blueprints (glitch-crafting).
  • Resource KVP: per-character flags, account names, Fence sales of the day and admin choices.

Database#

All tables start with glitch_criminaltablet_.

Table Holds
players Per character: alias, REP, rank, logs, heat, contacts, trust. The name comes from Config.DBTable
groups Crews: members, roles, bank (with log), crew REP, job state
crew_chats Crew chat (last 50 messages per crew)
contracts Contract board slots and claims
custom_contracts Contract locations admins create
turf, territories Influence per district, and drawn territories
spots Places admins add in the city (laundering spots and others)
market The Fence's stock and current prices
launder Laundering loads (spots and the wash network)
messages Contact messages (kept 14 days)
vinscratch VIN-scratched vehicles
economy Money in and out for the Admin tab (kept Config.Economy.logRetentionDays, 30 by default)
admin_log Admin tab audit log (kept 60 days)
crew_places Crew wardrobes, stashes and garages
intel The Board: what each character has found out
places, faces Upgraded tablet: places each character has found, and contact headshots
history Stats tab: job and drug history

Updating#

Replace everything except the files in config/, locales/ and the two bridge files (client/bridge.lua, server/bridge.lua) if you edited them, then compare your copies with the new ones and copy over any new settings. Tables are upgraded automatically on start.

Coming from before 2.1.0:

  • glitch-abstraction is no longer needed. Money and items go through qbx_core and ox_inventory in server/bridge.lua, and notifications through ox_lib in client/bridge.lua.
  • The crew, contract, job, turf, boost offer, chat and profile actions need a tablet session. Config.TabletSessionCheck = false turns the check off.
  • Config.NetEventGuard is off by default and can be set from convars.
  • Player-facing system text moved to locales/en.json.