diff --git a/[esx_addons]/esx_lscustom/client/main.lua b/[esx_addons]/esx_lscustom/client/main.lua index c23fe574..765463c2 100644 --- a/[esx_addons]/esx_lscustom/client/main.lua +++ b/[esx_addons]/esx_lscustom/client/main.lua @@ -391,6 +391,21 @@ CreateThread(function() ESX.UI.Menu.CloseAll() GetAction({value = 'main'}) + + -- Prevent Free Tunning Bug + CreateThread(function() + while lsMenuIsShowed do + DisableControlAction(2, 288, true) + DisableControlAction(2, 289, true) + DisableControlAction(2, 170, true) + DisableControlAction(2, 167, true) + DisableControlAction(2, 168, true) + DisableControlAction(2, 23, true) + DisableControlAction(0, 75, true) -- Disable exit vehicle + DisableControlAction(27, 75, true) -- Disable exit vehicle + Wait(0) + end + end) end end end @@ -399,17 +414,3 @@ CreateThread(function() Wait(Sleep) end end) - --- Prevent Free Tunning Bug -CreateThread(function() - while lsMenuIsShowed do - DisableControlAction(2, 288, true) - DisableControlAction(2, 289, true) - DisableControlAction(2, 170, true) - DisableControlAction(2, 167, true) - DisableControlAction(2, 168, true) - DisableControlAction(2, 23, true) - DisableControlAction(0, 75, true) -- Disable exit vehicle - DisableControlAction(27, 75, true) -- Disable exit vehicle - end -end)