Refactor: ESX Skin - Optimisations

This commit is contained in:
Mycroft
2022-03-02 19:52:58 +00:00
parent 72eaf601e8
commit 72aa093086
+6 -6
View File
@@ -143,9 +143,10 @@ end
CreateThread(function()
while true do
Wait(0)
local sleep = 1500
if isCameraActive then
sleep = 0
DisableControlAction(2, 30, true)
DisableControlAction(2, 31, true)
DisableControlAction(2, 32, true)
@@ -191,9 +192,8 @@ CreateThread(function()
PointCamAtCoord(cam, posToLook.x, posToLook.y, coords.z + camOffset)
ESX.ShowHelpNotification(_U('use_rotate_view'))
else
Wait(700)
end
Wait(sleep)
end
end)
@@ -201,9 +201,10 @@ CreateThread(function()
local angle = 90
while true do
Wait(0)
local sleep = 1500
if isCameraActive then
sleep = 0
if IsControlPressed(0, 108) then
angle = angle - 1
elseif IsControlPressed(0, 109) then
@@ -217,9 +218,8 @@ CreateThread(function()
end
heading = angle + 0.0
else
Wait(500)
end
Wait(sleep)
end
end)