Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jonteohr committed Mar 13, 2018
1 parent ebb9ba6 commit 68f05a5
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,20 @@ AddEventHandler('esx_repairkit:onUse', function()
TaskStartScenarioInPlace(playerPed, "PROP_HUMAN_BUM_BIN", 0, true)

Citizen.CreateThread(function()
TheadID = GetIdOfThisThread()
ThreadID = GetIdOfThisThread()
CurrentAction = 'repair'

Citizen.Wait(Config.RepairTime * 1000)

SetVehicleFixed(vehicle)
SetVehicleDeformationFixed(vehicle)
SetVehicleUndriveable(vehicle, false)
SetVehicleEngineOn(vehicle, true, true)
ClearPedTasksImmediately(playerPed)
if CurrentAction ~= nil then
SetVehicleFixed(vehicle)
SetVehicleDeformationFixed(vehicle)
SetVehicleUndriveable(vehicle, false)
SetVehicleEngineOn(vehicle, true, true)
ClearPedTasksImmediately(playerPed)

ESX.ShowNotification(_U('finished_repair'))
ESX.ShowNotification(_U('finished_repair'))
end

if not Config.IgnoreAbort then
TriggerServerEvent('esx_repairkit:removeKit')
Expand All @@ -85,6 +87,7 @@ AddEventHandler('esx_repairkit:onUse', function()
if IsControlJustReleased(0, Keys["X"]) then
TerminateThread(ThreadID)
ESX.ShowNotification(_U('aborted_repair'))
CurrentAction = nil
end
end

Expand Down

0 comments on commit 68f05a5

Please sign in to comment.