Skip to content

Commit

Permalink
No autorepairs while turning vehicle extras on/off
Browse files Browse the repository at this point in the history
  • Loading branch information
czsquizer authored Oct 16, 2020
1 parent d2cfc32 commit 2e09f3c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ local elements = {

local player = PlayerPedId()
local vehicle = GetVehiclePedIsIn(player,false)

SetVehicleAutoRepairDisabled(vehicle, true) -- Prevent from autorepair while turning on/off extras

ESX.UI.Menu.CloseAll()
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'vehicle_controls', {
title = _U('vehicle_control'),
Expand Down Expand Up @@ -400,4 +403,4 @@ function OpenVehicleExtrasMenu()
menu.close()
end)

end
end

0 comments on commit 2e09f3c

Please sign in to comment.