The four items#
Mechanic Creator does not add items to your inventory for you — it cannot, because every inventory stores them differently. These four have to exist before a mechanic can do the matching job.
Item | What it is for | Without it |
|---|---|---|
| Opens the shop tablet: orders, funds, staff, dyno and history. | Staff can still open it with the keybind, but the item is the route most servers want. |
| Full, body and engine repairs from the radial menu. | Every repair is refused with "you need a repairkit". |
| Towing a vehicle behind another. | Towing is refused. |
| Washing a vehicle. | Washing is refused. |
The images#
Four icons ship with the resource, in .README/images/. Copy them into your inventory's image folder before you add the items, or they show up as blank squares.
Inventory | Copy the four PNGs to |
|---|---|
|
|
|
|
|
|
Anything else | Whichever folder that inventory reads its icons from. |
Adding the items#
Pick your inventory and paste the block. Nothing else has to be registered: the resource declares the use handlers itself.
Add to ox_inventory/data/items.lua. The server.export line is what makes the item do something.
['mechanic_tablet'] = {
label = 'Mechanic Tablet',
weight = 1000,
stack = false,
close = true,
description = 'Digital tablet for managing your mechanic shop',
server = {
export = 'qs-mechanic-creator.useTablet'
}
},
['repairkit'] = {
label = 'Repair Kit',
weight = 500,
stack = true,
close = true,
description = 'A kit containing tools to repair vehicles',
server = {
export = 'qs-mechanic-creator.repairkit'
}
},
['rope'] = {
label = 'Rope',
weight = 300,
stack = true,
close = true,
description = 'A sturdy rope for towing vehicles',
server = {
export = 'qs-mechanic-creator.rope'
}
},
['sponge'] = {
label = 'Sponge',
weight = 100,
stack = true,
close = true,
description = 'A sponge for washing vehicles',
server = {
export = 'qs-mechanic-creator.sponge'
}
},Add to qs-inventory/shared/items.lua — or to qb-core/shared/items.lua if you run qs-inventory on QBCore. Note the export here is a client one, and the tablet's name differs from the ox version.
['mechanic_tablet'] = {
['name'] = 'mechanic_tablet',
['label'] = 'Mechanic Tablet',
['weight'] = 1000,
['type'] = 'item',
['image'] = 'mechanic_tablet.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Digital tablet for managing your mechanic shop',
['client'] = { ['export'] = 'qs-mechanic-creator.mechanic_tablet' }
},
['repairkit'] = {
['name'] = 'repairkit',
['label'] = 'Repair Kit',
['weight'] = 500,
['type'] = 'item',
['image'] = 'repairkit.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'A kit containing tools to repair vehicle body damage',
['client'] = { ['export'] = 'qs-mechanic-creator.repairkit' }
},
['rope'] = {
['name'] = 'rope',
['label'] = 'Rope',
['weight'] = 300,
['type'] = 'item',
['image'] = 'rope.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'A sturdy rope for towing vehicles',
['client'] = { ['export'] = 'qs-mechanic-creator.rope' }
},
['sponge'] = {
['name'] = 'sponge',
['label'] = 'Sponge',
['weight'] = 100,
['type'] = 'item',
['image'] = 'sponge.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'A sponge for washing vehicles',
['client'] = { ['export'] = 'qs-mechanic-creator.sponge' }
},Add to qb-core/shared/items.lua. No export is needed — useable = true is enough, and the resource registers the handler itself at boot.
['mechanic_tablet'] = {
['name'] = 'mechanic_tablet',
['label'] = 'Mechanic Tablet',
['weight'] = 1000,
['type'] = 'item',
['image'] = 'mechanic_tablet.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Digital tablet for managing your mechanic shop'
},
['repairkit'] = {
['name'] = 'repairkit',
['label'] = 'Repair Kit',
['weight'] = 500,
['type'] = 'item',
['image'] = 'repairkit.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'A kit containing tools to repair vehicle body damage'
},
['rope'] = {
['name'] = 'rope',
['label'] = 'Rope',
['weight'] = 300,
['type'] = 'item',
['image'] = 'rope.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'A sturdy rope for towing vehicles'
},
['sponge'] = {
['name'] = 'sponge',
['label'] = 'Sponge',
['weight'] = 100,
['type'] = 'item',
['image'] = 'sponge.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'A sponge for washing vehicles'
},On a classic ESX inventory the items live in the database. Run this once:
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('mechanic_tablet', 'Mechanic Tablet', 1, 0, 1),
('repairkit', 'Repair Kit', 500, 0, 1),
('rope', 'Rope', 300, 0, 1),
('sponge', 'Sponge', 100, 0, 1);If your ESX server runs a modern inventory instead — ox_inventory is the common one — use that tab rather than this SQL.
Renaming an item#
You do not have to use these names. If your server already has a repair kit called something else, keep yours and tell the resource about it in the Items section of the settings panel. Four names live there, one per job, and changing one takes effect immediately.
The same section decides whether an item is consumed or merely required, and whether a failed skill check eats the kit or spares it. Requirements can also be switched off wholesale, which is the usual choice on a roleplay-light server.
If an item does nothing#
Using it produces no reaction at all
The item exists but is not wired to the resource. On ox check the server.export line; on qs check the client.export line; on qb check useable = true. Then confirm the resource folder is named exactly qs-mechanic-creator, because the export path is built from that name.
It says the item is missing when I am holding it
The name in the settings panel does not match the name in your inventory. The message quotes the name it looked for — compare the two character for character.
The icon is a blank square
The PNGs have not been copied into your inventory's image folder, or the image field does not match the filename. This is cosmetic only — the item still works.
Nothing to do with items works at all
Your inventory probably started after this resource, so it was never detected. Move it above qs-mechanic-creator in server.cfg — see Installation.



