Config = {}
Config.InfiniteRepairs = false – Should one repairkit last forever?
Config.InfiniteRepairsTyreKit = false – Should one tyrekit last forever?
Config.IfMecaIsOnline = false – Set to true if you don’t want your players to use the RepairKit and TireKit if a mechanic is online
Config.RepairTime = 15 – In seconds, how long should a repair take?
Config.TyreKitTime = 20 – In seconds, how long does it took to replace the tyre?
Config.IgnoreAbort = false – Remove repairkit from inventory even if user aborts repairs?
Config.IgnoreTyreAbort = false – Remove repairkit from inventory even if user aborts repairs?
Config.AllowMecano = false – Allow mechanics to use this repairkit? (If you want this to work set “Config.IfMecaIsOnline” to false, it’s a known bug that will be fixed as soon as possible)
Config.RealisticVehicleFailure = true – Set to true if you are using the resource “RealisticVehicleFailure”
Config.ExplosionOnFailedRepair = true – Set to true if you wan’t to use “Config.ExplosionChance”
Config.ExplosionChance = 100 – The lower it is, the more it has a chance to make the engine fail and the car explode. (1 = 100%, 2 = 50%, 4 = 25%, 10 = 10%, 100 = 1%, etc)
Config.EnableProgressBar = true – If you don’t want a progress bar when your player use the item or you don’t want to use the resource “progressBars” then set it to false
everything works for me but I get a message saying I’m not in front of the engine when i am can i increase the distance so i don’t get that message? and where?
second, while the inventory menu is open when i have repair kit submenu open i press the space bar and it starts fixing the engine but also jumps to the top of the car is there a fixe to make the space bar, not function while using repair kit? the cause space bar is active on the inventory that’s why it does that.
the rest works fine.
suggestion to repair vehicle you would have to hold a wrench for the engine and for tire a crowbar. to make it realistic. I meant to force players like having that tool on hand i would have press a key to start fixing it…
thanks for the release
Ok, seems like it would be a very obvious question, how do you get/use repair kits… I installed this mod but have nothing in my inventory, don’t receive any prompts to repair car. Where are the repair kits, how do you use it…
Well idk where do you get the repairkit or tyrekit but i do /giveitem id repairkit quantity and it gives me the item .
Then ill go to inventory next to the wheel or engine and press use on the inventory.
Hello.
Thanks for your release.
I wanted to ask if this is updated to the latest ESX?
From what I can see, your .sql file is not updated but can be updated easily by anyone what I’m more concerned about is if the actual items will still perform normally with the newest ESX?
This is the one i use. i have removed the infront of engine check.
RegisterNetEvent(‘esx_repairkit:onUse’)
AddEventHandler(‘esx_repairkit:onUse’, function()
local playerPed = GetPlayerPed(-1)
local coords = GetEntityCoords(playerPed)
if IsAnyVehicleNearPoint(coords.x, coords.y, coords.z, 5.0) then
local vehicle = nil
if IsPedInAnyVehicle(playerPed, false) then
vehicle = GetVehiclePedIsIn(playerPed, false)
else
vehicle = GetClosestVehicle(coords.x, coords.y, coords.z, 5.0, 0, 71)
end
if DoesEntityExist(vehicle) then
if Config.IgnoreAbort then
--TriggerServerEvent('esx_repairkit:removeKit')
end
SetVehicleDoorOpen(vehicle, 4,0,0)
TaskStartScenarioInPlace(playerPed, "PROP_HUMAN_BUM_BIN", 0, true)
Citizen.CreateThread(function()
ThreadID = GetIdOfThisThread()
CurrentAction = 'repair'
exports['progressBars']:startUI(15000, "Forsøger at reparere motoren")
Citizen.Wait(Config.RepairTime * 1000)
if CurrentAction ~= nil then
SetVehicleDoorShut(vehicle, 4,0,0)
SetVehicleEngineOn(vehicle, true, true)
ClearPedTasksImmediately(playerPed)
TriggerServerEvent('esx_repairkit:removeKit')
SetVehicleEngineHealth(vehicle, 500.0)
SetVehiclePetrolTankHealth(vehicle, 500.0)
--ESX.ShowNotification(_U('finished_repair'))
exports['mythic_notify']:DoHudText('inform', 'Du har lavet en hurtig fix af motoren.')
end
CurrentAction = nil
TerminateThisThread()
end)
end
Citizen.CreateThread(function()
Citizen.Wait(0)
if CurrentAction ~= nil then
SetTextComponentFormat('STRING')
AddTextComponentString(_U('abort_hint'))
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
if IsControlJustReleased(0, Keys["X"]) then
TerminateThread(ThreadID)
--ESX.ShowNotification(_U('aborted_repair'))
exports['mythic_notify']:DoHudText('inform', 'Du har afbrydt handlingen.')
CurrentAction = nil
end
end
end)
else
--ESX.ShowNotification(_U('no_vehicle_nearby'))
exports['mythic_notify']:DoHudText('inform', 'Intet køretøj i nærheden.')
end