📄Installation Guide
Do not skim the instructions. You need to follow every step of the Install Guide to make sure you're installing the script correctly
Dependencies
1. Add the script to your server resources
We highly recommend putting jim-mechanic in a new folder called [jim]
NOTE: IF YOU ALREADY HAVE A [jim] FOLDER PUT IT IN THAT FOLDER YOU DO NOT NEED TO CREATE A NEW ONE.
Then add ensure [jim] after your other scripts have started in your server.cfg
2. Items
Add the images from the images folder in to your
INVENTORY > HTML > IMAGES
The following code block goes into your
QB-CORE > SHARED > ITEMS.LUA
--Jim-Mechanic Vehicles
["mechanic_tools"] = {["name"] = "mechanic_tools", ["label"] = "Mechanic tools", ["weight"] = 0, ["type"] = "item", ["image"] = "mechanic_tools.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = "Needed for vehicle repairs"},
["toolbox"] = {["name"] = "toolbox", ["label"] = "Toolbox", ["weight"] = 0, ["type"] = "item", ["image"] = "toolbox.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = "Needed for Performance part removal"},
["ducttape"] = {["name"] = "ducttape", ["label"] = "Duct Tape", ["weight"] = 0, ["type"] = "item", ["image"] = "bodyrepair.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = "Good for quick fixes"},
["mechboard"] = {["name"] = "mechboard", ["label"] = "Mechanic Sheet", ["weight"] = 0, ["type"] = "item", ["image"] = "mechboard.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
--Performance
["turbo"] = {["name"] = "turbo", ["label"] = "Supercharger Turbo", ["weight"] = 0, ["type"] = "item", ["image"] = "turbo.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = "Who doesn't need a 65mm Turbo??"},
["car_armor"]= {["name"] = "car_armor", ["label"] = "Vehicle Armor", ["weight"] = 0, ["type"] = "item", ["image"] = "armour.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["nos"]= {["name"] = "nos", ["label"] = "NOS Bottle", ["weight"] = 0, ["type"] = "item", ["image"] = "nos.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = "A full bottle of NOS"},
["noscan"]= {["name"] = "noscan", ["label"] = "Empty NOS Bottle", ["weight"] = 0, ["type"] = "item", ["image"] = "noscan.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = true, ["description"] = "An Empty bottle of NOS"},
["noscolour"]= {["name"] = "noscolour", ["label"] = "NOS Colour Injector", ["weight"] = 0, ["type"] = "item", ["image"] = "noscolour.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = true, ["description"] = "Make that purge spray"},
["engine1"]= {["name"] = "engine1", ["label"] = "Tier 1 Engine", ["weight"] = 0, ["type"] = "item", ["image"] = "engine1.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["engine2"]= {["name"] = "engine2", ["label"] = "Tier 2 Engine", ["weight"] = 0, ["type"] = "item", ["image"] = "engine2.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["engine3"]= {["name"] = "engine3", ["label"] = "Tier 3 Engine", ["weight"] = 0, ["type"] = "item", ["image"] = "engine3.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["engine4"]= {["name"] = "engine4", ["label"] = "Tier 4 Engine", ["weight"] = 0, ["type"] = "item", ["image"] = "engine4.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["engine5"]= {["name"] = "engine5", ["label"] = "Tier 5 Engine", ["weight"] = 0, ["type"] = "item", ["image"] = "engine5.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["transmission1"]= {["name"] = "transmission1", ["label"] = "Tier 1 Transmission", ["weight"] = 0, ["type"] = "item", ["image"] = "transmission1.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["transmission2"]= {["name"] = "transmission2", ["label"] = "Tier 2 Transmission", ["weight"] = 0, ["type"] = "item", ["image"] = "transmission2.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["transmission3"]= {["name"] = "transmission3", ["label"] = "Tier 3 Transmission", ["weight"] = 0, ["type"] = "item", ["image"] = "transmission3.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["transmission4"]= {["name"] = "transmission4", ["label"] = "Tier 4 Transmission", ["weight"] = 0, ["type"] = "item", ["image"] = "transmission4.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["brakes1"]= {["name"] = "brakes1", ["label"] = "Tier 1 Brakes", ["weight"] = 0, ["type"] = "item", ["image"] = "brakes1.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["brakes2"]= {["name"] = "brakes2", ["label"] = "Tier 2 Brakes", ["weight"] = 0, ["type"] = "item", ["image"] = "brakes2.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["brakes3"]= {["name"] = "brakes3", ["label"] = "Tier 3 Brakes", ["weight"] = 0, ["type"] = "item", ["image"] = "brakes3.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["suspension1"]= {["name"] = "suspension1", ["label"] = "Tier 1 Suspension", ["weight"] = 0, ["type"] = "item", ["image"] = "suspension1.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["suspension2"]= {["name"] = "suspension2", ["label"] = "Tier 2 Suspension", ["weight"] = 0, ["type"] = "item", ["image"] = "suspension2.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["suspension3"]= {["name"] = "suspension3", ["label"] = "Tier 3 Suspension", ["weight"] = 0, ["type"] = "item", ["image"] = "suspension3.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["suspension4"]= {["name"] = "suspension4", ["label"] = "Tier 4 Suspension", ["weight"] = 0, ["type"] = "item", ["image"] = "suspension4.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["suspension5"]= {["name"] = "suspension5", ["label"] = "Tier 5 Suspension", ["weight"] = 0, ["type"] = "item", ["image"] = "suspension5.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["bprooftires"]= {["name"] = "bprooftires", ["label"] = "Bulletproof Tires", ["weight"] = 0, ["type"] = "item", ["image"] = "bprooftires.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["drifttires"]= {["name"] = "drifttires", ["label"] = "Drift Tires", ["weight"] = 0, ["type"] = "item", ["image"] = "drifttires.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
--Cosmetics
["underglow_controller"]={["name"] = "underglow_controller",["label"] = "Neon Controller", ["weight"] = 0, ["type"] = "item", ["image"] = "underglow_controller.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = true, ["description"] = "RGB LED Vehicle Remote"},
["headlights"]= {["name"] = "headlights", ["label"] = "Xenon Headlights", ["weight"] = 0, ["type"] = "item", ["image"] = "headlights.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = "8k HID headlights"},
["tint_supplies"]= {["name"] = "tint_supplies", ["label"] = "Tint Supplies", ["weight"] = 0, ["type"] = "item", ["image"] = "tint_supplies.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = true, ["description"] = "Supplies for window tinting"},
["customplate"]= {["name"] = "customplate", ["label"] = "Customized Plates", ["weight"] = 0, ["type"] = "item", ["image"] = "plate.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["hood"]= {["name"] = "hood", ["label"] = "Vehicle Hood", ["weight"] = 0, ["type"] = "item", ["image"] = "hood.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["roof"]= {["name"] = "roof", ["label"] = "Vehicle Roof", ["weight"] = 0, ["type"] = "item", ["image"] = "roof.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["spoiler"]= {["name"] = "spoiler", ["label"] = "Vehicle Spoiler", ["weight"] = 0, ["type"] = "item", ["image"] = "spoiler.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["bumper"]= {["name"] = "bumper", ["label"] = "Vehicle Bumper", ["weight"] = 0, ["type"] = "item", ["image"] = "bumper.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["skirts"]= {["name"] = "skirts", ["label"] = "Vehicle Skirts", ["weight"] = 0, ["type"] = "item", ["image"] = "skirts.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["exhaust"]= {["name"] = "exhaust", ["label"] = "Vehicle Exhaust", ["weight"] = 0, ["type"] = "item", ["image"] = "exhaust.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["seat"]= {["name"] = "seat", ["label"] = "Seat Cosmetics", ["weight"] = 0, ["type"] = "item", ["image"] = "seat.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["rollcage"]= {["name"] = "rollcage", ["label"] = "Roll Cage", ["weight"] = 0, ["type"] = "item", ["image"] = "rollcage.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["rims"]= {["name"] = "rims", ["label"] = "Custom Wheel Rims", ["weight"] = 0, ["type"] = "item", ["image"] = "rims.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["livery"]= {["name"] = "livery", ["label"] = "Livery Roll", ["weight"] = 0, ["type"] = "item", ["image"] = "livery.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["paintcan"]= {["name"] = "paintcan", ["label"] = "Vehicle Spray Can", ["weight"] = 0, ["type"] = "item", ["image"] = "spraycan.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["tires"]= {["name"] = "tires", ["label"] = "Drift Smoke Tires", ["weight"] = 0, ["type"] = "item", ["image"] = "tires.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["horn"]= {["name"] = "horn", ["label"] = "Custom Vehicle Horn", ["weight"] = 0, ["type"] = "item", ["image"] = "horn.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["internals"] = {["name"] = "internals", ["label"] = "Internal Cosmetics", ["weight"] = 0, ["type"] = "item", ["image"] = "internals.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
["externals"] = {["name"] = "externals", ["label"] = "Exterior Cosmetics", ["weight"] = 0, ["type"] = "item", ["image"] = "mirror.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["description"] = ""},
--Repair Parts
["newoil"] = {["name"] = "newoil", ["label"] = "Car Oil", ["weight"] = 0, ["type"] = "item", ["image"] = "caroil.png", ["unique"] = false, ["useable"] = false,["shouldClose"] = false,["description"] = ""},
["sparkplugs"]= {["name"] = "sparkplugs", ["label"] = "Spark Plugs", ["weight"] = 0, ["type"] = "item", ["image"] = "sparkplugs.png", ["unique"] = false, ["useable"] = false,["shouldClose"] = false,["description"] = ""},
["carbattery"]= {["name"] = "carbattery", ["label"] = "Car Battery", ["weight"] = 0, ["type"] = "item", ["image"] = "carbattery.png", ["unique"] = false, ["useable"] = false,["shouldClose"] = false,["description"] = ""},
["axleparts"]= {["name"] = "axleparts", ["label"] = "Axle Parts", ["weight"] = 0, ["type"] = "item", ["image"] = "axleparts.png", ["unique"] = false, ["useable"] = false,["shouldClose"] = false,["description"] = ""},
["sparetire"]= {["name"] = "sparetire", ["label"] = "Spare Tire", ["weight"] = 0, ["type"] = "item", ["image"] = "sparetire.png", ["unique"] = true, ["useable"] = false,["shouldClose"] = false,["description"] = ""},
2. Job
The following code block goes into your
QB-CORE > SHARED > JOBS.LUA
['mechanic'] = {
label = 'Mechanic',
defaultDuty = true,
offDutyPay = false,
grades = {
['0'] = { name = 'Recruit', payment = 50 },
['1'] = { name = 'Novice', payment = 75 },
['2'] = { name = 'Experienced', payment = 100 },
['3'] = { name = 'Advanced', payment = 125 },
['4'] = { name = 'Manager', isboss = true, payment = 150 },
['5'] = { name = 'Owner', isboss = true, payment = 2500 },
},
},
If using QB-Management:
Update to the latest GitHub version
Make sure the job "mechanic" has been added to your database
The menu's targets should be accessible to bosses from the clock-in spot
3. NOS + Odometer
There are expanded features included in this script with SQL The included .SQL file needs to be imported into your player_vehicles database to add the appropriate columns (traveldistance, hasnitro, noslevel)
The hasnitro
and noslevel
columns being added enables the of saving Nitrous levels through server restarts
The traveldistance
column adds an Odometer to the toolbox/mechanic_tools menus, this can be retrieved in miles or kilometers.
4. QB-MechanicJob
You don't need qb-mechanicjob
to use this script
Extra damages will be enabled by default if you use qb-mechanicjob
and qb-vehiclefailure
This needs to be added to the main script, but if you DON'T want to use qb-mechanicjob but have an updated qb-vehiclefailure replace this event in qb-vehiclefailure > client.lua.
This will make it only work if qb-mechanicjob is started.
-- Functions
local function DamageRandomComponent()
if GetResourceState('qb-mechanicjob') ~= "started" then return end
local dmgFctr = math.random() + math.random(0, 2)
local randomComponent = DamageComponents[math.random(1, #DamageComponents)]
local randomDamage = (math.random() + math.random(0, 1)) * dmgFctr
exports['qb-mechanicjob']:SetVehicleStatus(QBCore.Functions.GetPlate(vehicle), randomComponent, exports['qb-mechanicjob']:GetVehicleStatus(QBCore.Functions.GetPlate(vehicle), randomComponent) - randomDamage)
end
Last updated