🗒ī¸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

Last updated