m-Scripts
  • m-Scripts Documentation
  • QBCore
    • Jobs
      • 🚗[QB] TunerJob
        • 🛠️Installation
        • ❓Common Questions
        • 🗒️Config
      • 🍞[QB] BeanMachine
        • 🛠️Installation
        • 🗒️Config
      • 🍔[QB] Burgershot
        • 🛠️Installation
        • 🗒️Config
      • 🍈[QB] CoolBeans
        • 🛠️Installation
        • 🗒️Config
      • 🚚[QB] Deliveries
        • 🛠️Installation
        • 📃Config
          • 📃config_functions
      • 🍎[QB] Farming
        • 🛠️Installation
        • 🗒️Config
      • 🐟[QB] Fishing
        • 🛠️Installation
        • 🗒️Config
          • 📄config_diving
          • 📄config_fishingnet
          • 📄config_fishingrod
          • 📄config_functions
          • 📄config_language
          • 📄config_seashells
          • 📄config_tournament
          • 📄config_upgrades
      • 🚛[QB] Garbage
        • 🛠️Installation
        • 🗒️Config
      • 🗝️[QB] GoldRush
        • 🛠️Installation
        • 🗒️Config
      • ⛰️[QB] Hunting
        • 🛠️Installation
        • 🗒️Config
      • 🪵[QB] Lumberjack
        • 🛠️Installation
        • 🗒️Config
      • ⛏️[QB] Mining
        • 🛠️Installation
        • 🗒️Config
      • 🛢️[QB] Oil Factory
        • 🛠️Installation
        • ❓Common Questions
        • 🗒️Config
      • ☕[QB] Pond Coffee
        • 🛠️Installation
        • ❓Common Questions
        • 🗒️Config
      • 🚚[QB] Trucker
        • 🛠️Installation
        • 🗒️Config
          • 📄Functions
          • 📄Language
      • 🥃[QB] Vanilla
        • 🛠️Installation
        • 🗒️Config
      • 🛻[QB] Mechanic Run
        • 🛠️Installation
        • 🗒️Config
      • 🥃[QB] Bahamas
        • 🛠️Installation
        • 📄Config
      • 🔫[QB] Ammunation
        • 🛠️Installation
        • 📄Config
      • 🐟[QB] Pearls
        • 🛠️Installation
        • 📄Config
      • 🔓[QB] Impound
        • 🛠️Installation
        • 📄Config
        • ✅Garages
      • 🚘[QB] Vehicleshop
        • 🛠️Installation
        • 📄Config
          • Functions
          • Job
          • Language
        • ❓Common Questions
    • General
      • 🏕️[QB] Camping
        • 🛠️Installation
        • 🗒️Config
          • Consumables
          • Language
      • 🎄[QB] Christmas
        • 🛠️Installation
        • 🗒️Config
      • 🎃[QB] Halloween
        • 🛠️Installation
        • 🗒️Config
      • 📔[QB] Insurance
        • 🛠️Installation
        • 🖥️Compatibilities
        • 🗒️Config
        • 🔁Server-Exports
      • 🏘️[QB] Vespucci
        • 🛠️Installation
        • 🗒️Config
          • Brewery
          • Digital Den
          • Masquerade
          • Pro Bikes
      • 🏖️[QB] Beach Activities
        • 🛠️Installation
        • 🗒️Config
      • 🚘[QB] Car Rental
        • 🛠️Installation
        • 📄Config
        • 🖥️Compatibilities
      • ✈️[QB] Sky Racing
        • 🛠️Installation
        • 📄Config
      • 🚘[QB] Car Wash
        • 🛠️Installation
        • 📄Config
      • 🪨[QB] Grinder
        • 🛠️Installation
        • 📄Config
      • 📹[QB] SpyCams & CCTV's
        • 🛠️Installation
        • 📄Config
      • 🏠[QB] Motel
        • 🛠️Installation
        • 📄Config
        • 🖥️Compatibilities
      • 🏚️[QB] Job Center
        • 📄Config
      • 🛠️[QB] Crafting
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
    • Illegal
      • 🔫[QB] Gangs
        • 🛠️Installation
        • 🗒️Config
      • 🔔[QB] Drug Selling
        • 🗒️Config
      • 🌱[QB] Drugs
        • 🛠️Installation
        • 🗒️Config
      • 🍯[QB] Craft Potion
        • 🛠️Installation
        • 🗒️Config
      • 🅱️[QB] Blackmarket
        • 🛠️Installation
        • 🗒️Config
          • config_functions
          • config_language
      • 🚗[QB] Car Thief
        • 🗒️Config
      • 🏠[QB] House Robbery
        • 🛠️Installation
        • 🗒️Config
      • 💎[QB] Jewelry
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • ®️[QB] Mini Robberys
        • 🛠️Installation
        • 🗒️Config
      • 💰[QB] MoneyWash
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 🔫[QB] Rob NPC
        • 🛠️Installation
        • 🗒️Config
      • 🏃‍♂️[QB] Runs
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • ⛽[QB] Steal Fuel
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 🏬[QB] Store Robbery
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 🪛[QB] Scrapyard
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 👾[QB] Territories
        • 🛠️Installation
        • 📄Config
          • Functions
      • 🏨[QB] GoPostal
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
          • S_utils
  • ESX
    • Jobs
      • 🚗[ESX] Tunerjob
        • ❗Dependencies
        • 🛠️Installation
          • ℹ️OX-Inventory
          • ℹ️QS-Inventory
        • 🗒️Config
          • BlacklistVehicles
          • Craft
          • Functions
          • Language
          • Targets
          • Wraps
          • Events
        • ❓Common Questions
      • 🚚[ESX] Trucker
        • 🛠️Installation
        • 🗒️Config
          • 📄Functions
          • 📄Language
      • 🪵[ESX] Lumberjack
        • 🛠️Installation
        • 🗒️Config
      • 🛻[ESX] Mechanic Run
        • 🛠️Installation
        • 🗒️Config
      • ⛏️[ESX] Mining
        • 🛠️Installation
        • 🗒️Config
      • 🎣[ESX] Fishing
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
          • Diving
          • Fishingnet
          • Fishingrod
          • Seashells
          • Tournament
          • Upgrades
    • General
      • 🚘[ESX] Car Rental
        • 🛠️Installation
        • 🗒️Config
      • 📃[ESX] Insurance
        • 🛠️Installation
        • 🖥️Compatibilities
        • 📄Config
        • 🔁 Server-Exports
      • 🚘[ESX] Car Wash
        • 🛠️Installation
        • 📄Config
      • 📹[ESX] SpyCams & CCTV's
        • 🛠️Installation
        • 📄Config
        • 🏠[ESX] Motel
          • 🛠️Installation
          • 📄Config
          • 🖥️Compatibilities
      • 🛠️[ESX] Crafting
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
      • 🎄[ESX] Christmas
        • 🛠️Installation
        • 📄Configs
    • Illegal
      • 🔫[ESX] Gangs
        • 🛠️Installation
        • 📄Config
        • ❓Common Questions
      • 🅱️[ESX] Blackmarket
        • 🛠️Installation
        • 🗒️Config
          • config_functions
          • config_language
      • 🏨[ESX] GoPostal
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
          • S_utils
  • Both Framework
    • Scripts
      • 🚗Car Rebuild
        • 🛠️Installation
        • 🗒️Config
      • 🗺️City Guide
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
      • 🛒Shops
        • 📄Config
        • 🛠️Installation
      • 🔁Reputation
        • 📄Config
        • 🛠️Installation
        • ⁉️Exports & Commands
          • Server Exports
          • Commands
      • 💤AFK System
        • 📄Configs
        • 🛠️Installation
      • 🚗Garages
        • 🛠️Installation
        • 📑User Guide
          • Create Garages
          • Create Private Garage
          • Impound & Auctions
          • Add vehicle to gang/job
          • Commands
      • ✈️Airplane Job
        • 🛠️Installation
        • 📃Configs
        • ℹ️Exports
      • 📋Scoreboard
        • 📃Config
      • 📦StorageUnits
        • 🛠️Installation
        • 📃Config
Powered by GitBook
On this page
  1. QBCore
  2. Jobs
  3. [QB] Mechanic Run

Config

Config = {}

--░██████╗███████╗████████╗████████╗██╗███╗░░██╗░██████╗░░██████╗
--██╔════╝██╔════╝╚══██╔══╝╚══██╔══╝██║████╗░██║██╔════╝░██╔════╝
--╚█████╗░█████╗░░░░░██║░░░░░░██║░░░██║██╔██╗██║██║░░██╗░╚█████╗░
--░╚═══██╗██╔══╝░░░░░██║░░░░░░██║░░░██║██║╚████║██║░░╚██╗░╚═══██╗
--██████╔╝███████╗░░░██║░░░░░░██║░░░██║██║░╚███║╚██████╔╝██████╔╝
--╚═════╝░╚══════╝░░░╚═╝░░░░░░╚═╝░░░╚═╝╚═╝░░╚══╝░╚═════╝░╚═════╝░

Config.Settings = {
    core = "qb-core", -- Your qb-core folder name
    target = "qb", -- "qb" or "ox"
    debug = true, -- If true have some prints and you can make the command /veh for testing.
    phone = "qb-phone", -- "qb-phone" | "qs-smartphone" | "roadphone" | "gksphone"
    jobs = {"mechanic", "police"},
    inventory = "qb", -- "qb" or "ox"
    item = "runrepairkit", -- Item used for repairing
}

Config.CompanyPayment = {
    enable = true, -- Want add the same reward to the company?
    companyName = "mechanic", -- Name of the job to received the reward
    companyReward = {
        min = 1000, -- min reward
        max = 2000, -- max reward
    }
}

Config.SettingsRun = {
	Npc = true, -- If true then spawn a npc in garage to start the run, if false you need use radialmenu
   	Payment = { min = 25, max = 75 }, -- Payment for each run
   	Type = "cash", -- "cash" or "bank"
   	Time = math.random(5000,7500), -- Time to wait new run
   	RepairingTime = 12000, -- 12 Seconds to repair the vehicle
   	Remove = 1, -- 1 = Vehicle delete when finish repair. | 2 = Vehicle delete after 20 seconds of repairing
}

Config.MechanicPed = { -- This is the npc inside the mechanic chop to start run
    [1] = {type = 4, hash= GetHashKey("s_m_m_gaffer_01"), x = 150.78,  y = -3016.33,  z = 6.04, h = 141.78}, 
}

Config.PossibleSpawnPoints = { -- Possible spawn points for cars
    vector4(283.9, -230.13, 53.99, 11.51),
    vector4(836.61, -47.01, 78.76, 311.04),
    vector4(916.4, -170.64, 74.43, 92.03),
    vector4(1100.58, -398.86, 67.4, 74.4),
    vector4(1121.81, -771.87, 57.81, 359.48),
    vector4(1018.19, -773.72, 57.88, 308.9),
    vector4(472.92, -1092.28, 29.2, 90.65),
    vector4(485.02, -1275.17, 29.64, 98.59),
    vector4(798.76, -1780.08, 29.31, 232.22),
    vector4(854.04, -2095.48, 30.27, 353.57)
}

Config.PossibleVehicles = {	-- Possible models that can spawn
	{ model = "cogcabrio"},
	{ model = "oracle2"},
	{ model = "zion"},
	{ model = "panto"},
	{ model = "felon"},
	{ model = "jackal"},
	{ model = "windsor2"},
	{ model = "f620"},
	{ model = "ruiner"},
	{ model = "virgo2"},
	{ model = "asea"},
	{ model = "exemplar"}
}

Config.Language = {
	dead = "You are dead you can't do that.",
   	water = "You are in the water you can't do that.",
   	inside = "You cannot do this inside a vehicle.",
   	noKit = "You dont have any run repair kit.",
   	wrong = "Something wrong.",
   	repairing = "Repairing the vehicle...",
   	blip = "Vehicle Run", -- This is the blip for vehicle need assistence
   	start = "Start Run",
   	repaired = "Vehicle repaired! You can leave and the client will come and collect it later.",
    validJob = "You dont have the valid job",
    paid = "You were paid: $",
}

function Email( vehicle, plate )
	if Config.Settings.phone == "qs-smartphone" then
        TriggerServerEvent("qs-smartphone:server:sendNewMail", {
            sender = "Client",
            subject = "Mechanical Assistance",
            message = "Hi!<br>I needed some help!<br><br>Details Vehicle:<br>Model: "..vehicle.."<br>Plate: "..plate.."<br><br>Message: My vehicle is parked and has stopped working, can you come and help please? <br><br>I shared the location on the GPS!<br><br>Thanks!",
        })
    elseif Config.Settings.phone == 'gksphone' then
        TriggerServerEvent("gksphone:NewMail", {
            sender = "Client",
            image   = '/html/static/img/icons/mail.png',
            subject = "Mechanical Assistance",
            message = "Hi!<br>I needed some help!<br><br>Details Vehicle:<br>Model: "..vehicle.."<br>Plate: "..plate.."<br><br>Message: My vehicle is parked and has stopped working, can you come and help please? <br><br>I shared the location on the GPS!<br><br>Thanks!",
        })
    elseif Config.Settings.phone == 'roadphone' then
        TriggerServerEvent("roadphone:receiveMail", {
            sender = "Client",
            subject = "Mechanical Assistance",
            message = "Hi!<br>I needed some help!<br><br>Details Vehicle:<br>Model: "..vehicle.."<br>Plate: "..plate.."<br><br>Message: My vehicle is parked and has stopped working, can you come and help please? <br><br>I shared the location on the GPS!<br><br>Thanks!",
        })
    elseif Config.Settings.phone == "qb-phone" then
        TriggerServerEvent("qb-phone:server:sendNewMail", {
            sender = "Client",
            subject = "Mechanical Assistance",
            message = "Hi!<br>I needed some help!<br><br>Details Vehicle:<br>Model: "..vehicle.."<br>Plate: "..plate.."<br><br>Message: My vehicle is parked and has stopped working, can you come and help please? <br><br>I shared the location on the GPS!<br><br>Thanks!",
            button = {},
        })
    elseif Config.Settings.phone == "lb-phone" then
        local playerPed = PlayerPedId()
        local success, id = exports["lb-phone"]:SendMail({
            to = playerPed,
            subject = "Mechanical Assistance",
            message = "Hi!<br>I needed some help!<br><br>Details Vehicle:<br>Model: "..vehicle.."<br>Plate: "..plate.."<br><br>Message: My vehicle is parked and has stopped working, can you come and help please? <br><br>I shared the location on the GPS!<br><br>Thanks!",
            attachments = {
                "https://cdn.discordapp.com/attachments/1035667053115363349/1042500877426110474/upload.png",
            }
        })
    end
end
PreviousInstallationNext[QB] Bahamas

Last updated 1 year ago

🛻
🗒️