Updated 2026-10-11 · 3 min read
qb-mechanicjob: repairs, tuning and vehicle wear
qb-mechanicjob offers mechanic job locations and configurable vehicle painting, tuning, nitrous, repairs, distance and component wear. This guide reflects upstream commit 9dded68. It is not a separate paid-service-order, towing dispatch and invoice management system.
Installation and required integrations
The manifest loads config/*.lua, client/*.lua, server/main.lua, NUI assets and vehicle modification meta files, plus oxmysql. Ensure qb-core, the installed qb-inventory, vehicle definitions and fuel provider are compatible.
- Deploy the complete resource and set up jobs/grades in QBCore shared jobs.
- Keep custom
Config.Shopssettings, relevant shared items and shop vehicle lists. - Check
Config.FuelResourcepoints to the actual compatible client fuel export. - Test the job's duty, repairs, nitrous, painting and inventory deduction on a disposable test server.
The upstream repository tree contains no standalone mechanic billing SQL schema. Previously documented mechanic_orders, mechanic_parts and mechanic_invoices tables do not belong to this implementation.
Configuration layout
The current config/config.lua uses:
| Setting | Purpose |
|---|---|
Config.RequireJob | Whether parts require a mechanic job |
Config.FuelResource | Fuel export resource name (default LegacyFuel) |
Config.PaintTime | Painting duration in seconds |
Config.NitrousBoost / NitrousUsage | Nitrous behavior |
Config.UseDistance / UseDistanceDamage | Vehicle distance tracking/damage |
Config.UseWearableParts / WearableParts | Components and required repair items |
Config.DamageThreshold / WarningThreshold | Component status boundaries |
Config.MinimalMetersForDamage | Distance/damage ranges |
Config.Shops | Real mechanic work locations, duties, stashes and vehicles |
-- Modify existing source configuration:
Config.RequireJob = true
Config.FuelResource = 'LegacyFuel'
Config.UseWearableParts = true
Config.UseDistance = trueThe reviewed config does not define root Config.ModificationCosts, Config.RepairCost or a generic Config.TowSpawns. Shop positions and vehicles are nested under Config.Shops.
Client events and server callbacks
client/repair.lua registers actual events such as qb-mechanicjob:client:PartsMenu, repairVehicle, repairVehicleFull, repairTire and cleanVehicle.
The server registers QBCore callbacks:
qb-mechanicjob:server:getVehicleStatusqb-mechanicjob:server:checkTuneqb-mechanicjob:server:getnitrousVehiclesqb-mechanicjob:server:hasPermission
Internal server events include qb-mechanicjob:server:repairVehicleComponent, updateVehicleComponents, updateDrivingDistance, SaveVehicleProps, syncNitrous, sprayVehicle and removeItem.
There are no public qb-mechanicjob exports for RepairVehicle, ModifyVehicle or CreateServiceOrder in the reviewed server. Do not copy those from an unrelated mechanic fork. Inventory item use, valid vehicle ownership, nearby shop/work permissions and payment rules must be validated server-side before applying state changes.
Troubleshooting
| Symptom | Check |
|---|---|
| Mechanic options missing | Config.RequireJob, active job and Config.Shops |
| Parts menu opens but repair fails | Shared item names, inventory quantity and server callback |
| Nitrous no longer syncs | syncNitrous server event and vehicle/network ownership |
| Wear resets after reboot | Distance/component state persistence and vehicle plate |
| Fuel changes fail after an update | Config.FuelResource and client fuel exports |
No such export RepairVehicle | This upstream source registers a client event, not that export |
Update checklist
- Record deployed mechanic, inventory, core, fuel and garage versions.
- Preserve existing
Config.Shopsand wearable-parts modifications. - Test a mechanic and non-mechanic player using repair/tuning requests.
- Test unauthorized/replayed requests and persistence across reconnect before production.
Sources
Repository · Configuration · Server callbacks/events · Client repair
Found an issue in this guide?
Send the page URL, the affected example, and a source or reproduction to the site maintainer. For a server or resource problem, use the support guide.
qb-diving
Verified qb-diving source reference for coral collection, oxygen gear, sell locations, police chance, inventory and troubleshooting.
qb-policejob
Source-backed qb-policejob guide covering current police locations, evidence, armory, impound, cuffs, license commands and configuration without invented MDT APIs.
