Studios
Mechanic Jobhouse-3.jpg

Installation

SoonMechanic JobQbox
PAGE 02 OF 07  ·  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_inventory, ox_target
OneSync Required. The manifest lists /onesync, so the resource does not start without it.
Database MySQL or MariaDB through oxmysql. The tables are created when the resource starts.
Bank omes_banking or Renewed-Banking for shop accounts, found on their own. Any other banking resource works through your own functions in Mechanic.Integrations.banking. Without a bank, shops cannot buy from the supplier and orders cannot be approved.
Optional glitch-uiElements (1.1.0 or newer), glitch-xpSystem, glitch-minigames, glitch-businesstablet, glitch-mechanicMenu, glitch-vehicleSounds, qbx_vehiclekeys, qbx_vehicles and others. See Optional Resources.

Tested with qbx_core 1.24.0, ox_inventory 2.48.0, ox_lib 3.40.0, ox_target 1.17.2, oxmysql 2.14.2 and glitch-uiElements 1.1.0.

[!WARNING] Besides its own glitch_mech_* tables, the resource writes the mods column of player_vehicles whenever a build changes, so a garaged car comes back with its parts. Take a database backup before you install it on a live server and test with a throwaway character first.

Installation steps#

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

  2. Copy the entries between the begin and end markers in install/items.lua into ox_inventory/data/items.lua. Copy every PNG in install/images to ox_inventory/web/images, then restart ox_inventory. If your images live somewhere else (the inventory:imagepath convar), put them there and point Mechanic.Config.imagePath at the same folder.

  3. Optionally run install/install.sql. The tables are also created on first start, so you only need it when your database user cannot create tables.

  4. Add to server.cfg, after ox_lib, oxmysql, qbx_core, ox_inventory, ox_target and your bank resource. Start any optional resources you use before the job:

    ensure glitch-uiElements
    ensure glitch-xpSystem
    ensure glitch-minigames
    ensure glitch-mechanicJob
    add_ace group.admin command.mechanicadmin allow
    
  5. Restart the server and run /mechanicadmin in the city. Under Shops, make a shop: pick its qbx job (or make one on the Jobs tab), its bank account and its speciality, then stand at each spot and set the zones (desk, stock shelf, paint booth, dyno, drop-off, engine stands, shop area).

  6. Run mechaniccheck in the server console. It lists missing items, tables, jobs and bank accounts, the optional resources it found, which menus are in use and whether workshop parking and phone fines are on.

[!NOTE] The package ships without shops. Nothing appears in the city until you make one in /mechanicadmin.

With glitch-admin running, its role permission panel_mechanicjob also opens the admin panel. The server checks the permission again on every admin action.

Commands#

Command Who What
/mechanicadmin ACE command.mechanicadmin or glitch-admin panel_mechanicjob Admin panel for shops, zones, parts, prices, levels, jobs and diagnostics
mechaniccheck Server console Prints the setup report
/mechanicvolume 0-100 Everyone Sets your own turbo and blow-off volume
/tunertablet Driver or front passenger Opens the in-car Tuner tablet (F7 by default)

Updating#

Replace everything except config/local/, which is not part of the package. Admin panel edits live in the resource KVP and survive an update. Tables and columns are added on start.

From 3.4.0, three defaults changed:

  • The glitch-pauseMenu and glitch-poolcleaning helpers are off. Set Mechanic.Integrations.includes = true to keep them.
  • Mechanic.Config.repairDrops is empty. Put your salvage list back if your ox_inventory has the items.
  • config/sounds.lua only lists the stock GTA sounds. Move any sound banks or Mechanic.ModelAudio entries you added there into a file in config/local/.

From 3.2.0, admin edits, managed jobs and testing flags moved from data/*.json into the resource KVP. Keep the old data folder for the first start. Each file is imported once, and you can delete the folder after that.