LogoLogo
Discord
  • Project Sponsors
    • ✍️JetBrains
    • 📚GitBook
    • 🗃️Pleb Masters: Forge
    • 🎥KakarotDevs
  • Guides
    • 🪟Windows Installation
    • 🐧Linux Installation
    • 🔓Setting Permissions
    • 🚀Script Optimization
    • 📑Miscellaneous Guides
    • 📝Visual Studio Code
    • 🔗Useful Links
  • QB-Core
    • Core Object
    • 📊Player Data
    • 📜Shared
    • ↗️Shared Exports
    • 💬DrawText
    • 🎮Client Event Reference
    • 🎮Client Function Reference
    • 🖥️Server Event Reference
    • 🖥️Server Function Reference
    • ❗Commands
  • QBCore Resources
    • 🔧qb-adminmenu
    • 🚑qb-ambulancejob
    • 🏨qb-apartments
    • 🏦qb-banking
    • 💰qb-bankrobbery
    • 🚌qb-busjob
    • 🏢qb-cityhall
    • 👕qb-clothing
    • 🪙qb-crypto
    • 🤿qb-diving
    • 🚪qb-doorlock
    • 💊qb-drugs
    • ⌚qb-fitbit
    • ⛽qb-fuel
    • 🚘qb-garages
    • 🚛qb-garbagejob
    • 🌭qb-hotdogjob
    • 🔫qb-houserobbery
    • 🏡qb-houses
    • ℹ️qb-hud
    • 📝qb-input
    • 🏠qb-interior
    • 🎒qb-inventory
    • 💎qb-jewelry
    • 🏁qb-lapraces
    • 🔃qb-loading
    • 👔qb-management
    • 🧑‍🔧qb-mechanicjob
    • ↖️qb-menu
    • qb-minigames
    • 🙋qb-multicharacter
    • 📰qb-newsjob
    • 🤑qb-pawnshop
    • 📱qb-phone
    • 👮qb-policejob
    • 🔐qb-prison
    • 🔄qb-radialmenu
    • 📻qb-radio
    • ♻️qb-recyclejob
    • 📋qb-scoreboard
    • 🔋qb-scrapyard
    • 🏪qb-shops
    • 📚qb-smallresources
    • 🗺️qb-spawn
    • 🔫qb-storerobbery
    • 🏎️qb-streetraces
    • 🚕qb-taxijob
    • 🛻qb-towjob
    • 👁️qb-target
    • 🚛qb-truckerjob
    • 🔫qb-truckrobbery
    • 🔑qb-vehiclekeys
    • 📄qb-vehiclesales
    • 🚗qb-vehicleshop
    • 🍇qb-vineyard
    • 🔫qb-weapons
    • 🌤️qb-weathersync
    • 🌿qb-weed
Powered by GitBook

Community

  • Discord
  • Guilded
  • Reddit

Social Media

  • YouTube
  • Facebook
  • Twitch

@ 2025 QBCore Framework

On this page
  • Introduction
  • Preview
  • Configuration
  • General
  • Locations
  • Vehicle parts
  • Vehicle part damage
  • Commands

Was this helpful?

Edit on GitHub
  1. QBCore Resources

qb-mechanicjob

Fix 'em up real good

Previousqb-managementNextqb-menu

Last updated 1 year ago

Was this helpful?

Introduction

  • Players with the mechanic job can attach vehicles to "plates" and repair body/engine. This also includes a stash, job vehicles and a clock in/out location

Preview

Configuration

General

Config = {}

Config.AttachedVehicle = nil -- changes dynamically, don't edit

Config.AuthorizedIds = { -- players authorized to use hire/fire commands
    "insertcitizenidhere",
}

Config.Vehicles = { -- list of job vehicles that can be withdrawn
    ["flatbed"] = "Flatbed",
    ["towtruck"] = "Towtruck",
    ["minivan"] = "Minivan (Rental Car)",
    ["blista"] = "Blista",
}

Locations

Config.Locations = {
    ["exit"] = vector3(-339.04, -135.53, 39), -- location for map blip
    ["duty"] = vector3(-323.39, -129.6, 39.01), -- interaction location
    ["stash"] = vector3(-319.49, -131.9, 38.98), -- interaction location
    ["vehicle"] = vector4(-370.51, -107.88, 38.35, 72.56), -- interaction location
}

Config.Plates = { -- repair locations that "locks" vehicle in place
    [1] = { -- polyzone box data
        coords = vector4(-340.95, -128.24, 39, 160.0),
        boxData = {
            heading = 340,
            length = 5,
            width = 2.5,
            debugPoly = false
        },
        AttachedVehicle = nil, -- changes dynamically, don't edit
    },
    [2] = {
        coords = vector4(-326.78, -144.82, 39.06, 70),
        boxData = {
            heading = 249,
            length = 6.5,
            width = 5,
            debugPoly = false
        },
        AttachedVehicle = nil,
    },
}

Vehicle parts

Config.MaxStatusValues = { -- the maximum health of the given part
    ["engine"] = 1000.0,
    ["body"] = 1000.0,
    ["radiator"] = 100,
    ["axle"] = 100,
    ["brakes"] = 100,
    ["clutch"] = 100,
    ["fuel"] = 100,
}

Config.ValuesLabels = { -- the label of the given part in the repair menu
    ["engine"] = "Motor",
    ["body"] = "Body",
    ["radiator"] = "Radiator",
    ["axle"] = "Drive Shaft",
    ["brakes"] = "Brakes",
    ["clutch"] = "Clutch",
    ["fuel"] = "Fuel Tank",
}

Config.RepairCost = { -- the item that is needed to repair the given part
    ["body"] = "plastic",
    ["radiator"] = "plastic",
    ["axle"] = "steel",
    ["brakes"] = "iron",
    ["clutch"] = "aluminum",
    ["fuel"] = "plastic",
}

Config.RepairCostAmount = { -- the item and amount that is need to repair a part
    ["engine"] = {
        item = "metalscrap",
        costs = 2,
    },
    ["body"] = {
        item = "plastic",
        costs = 3,
    },
    ["radiator"] = {
        item = "steel",
        costs = 5,
    },
    ["axle"] = {
        item = "aluminum",
        costs = 7,
    },
    ["brakes"] = {
        item = "copper",
        costs = 5,
    },
    ["clutch"] = {
        item = "copper",
        costs = 6,
    },
    ["fuel"] = {
        item = "plastic",
        costs = 5,
    },
}

Vehicle part damage

Config.Damages = { -- These are the menu labels for the respective part 
    ["radiator"] = "Radiator",
    ["axle"] = "Drive Shaft",
    ["brakes"] = "Brakes",
    ["clutch"] = "Clutch",
    ["fuel"] = "Fuel Tank",
}

Config.MinimalMetersForDamage = { -- vehicle driving distance range
    [1] = {
        min = 8000, -- minimum range for damage to occur
        max = 12000, -- maximum range for damage to occur
        multiplier = {
            min = 1, -- minimum damage multiplier
            max = 8, -- maximum damage multiplier 
        }
    },
    [2] = {
        min = 12000,
        max = 16000,
        multiplier = {
            min = 8,
            max = 16,
        }
    },
    [3] = {
        min = 12000,
        max = 16000,
        multiplier = {
            min = 16,
            max = 24,
        }
    },
}

Commands

Only players with citizenid's found in the config can use these commands

  • /setmechanic - Hire a player as a mechanic

  • /firemechanic - Remove a player as a mechanic

  • /setvehiclestatus - Modify the vehicle part damage level

🧑‍🔧
Displays vehicle heath
Menu for mechanics to work on cars
Displays vehicle health in chat