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 themodscolumn ofplayer_vehicleswhenever 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#
Put the
glitch-mechanicJobfolder in your resources folder. The folder name is case-sensitive and must stayglitch-mechanicJob.Copy the entries between the begin and end markers in
install/items.luaintoox_inventory/data/items.lua. Copy every PNG ininstall/imagestoox_inventory/web/images, then restart ox_inventory. If your images live somewhere else (theinventory:imagepathconvar), put them there and pointMechanic.Config.imagePathat the same folder.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.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 allowRestart the server and run
/mechanicadminin 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).Run
mechaniccheckin 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 = trueto keep them. Mechanic.Config.repairDropsis empty. Put your salvage list back if your ox_inventory has the items.config/sounds.luaonly lists the stock GTA sounds. Move any sound banks orMechanic.ModelAudioentries you added there into a file inconfig/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.