mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 08:13:21 +00:00
fix menu stuck on screen
This commit is contained in:
@@ -47,14 +47,10 @@ CreateThread(function()
|
||||
if distance < Config.DrawDistance then
|
||||
Sleep = 0
|
||||
DrawMarker(Config.MarkerType, Config.Zones[i], 0.0, 0.0, 0.0, 0, 0.0, 0.0, Config.ZoneSize.x, Config.ZoneSize.y, Config.ZoneSize.z, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, false, false, false)
|
||||
else
|
||||
if menuIsShowed then
|
||||
ESX.UI.Menu.CloseAll()
|
||||
menuIsShowed = false
|
||||
end
|
||||
end
|
||||
|
||||
if distance < (Config.ZoneSize.x / 2) then
|
||||
isInMarker = true
|
||||
ESX.ShowHelpNotification(_U('access_job_center'))
|
||||
if IsControlJustReleased(0, 38) and not menuIsShowed then
|
||||
ESX.UI.Menu.CloseAll()
|
||||
@@ -62,7 +58,13 @@ CreateThread(function()
|
||||
end
|
||||
end
|
||||
end
|
||||
Wait(Sleep)
|
||||
|
||||
if not isInMarker and menuIsShowed then
|
||||
ESX.UI.Menu.CloseAll()
|
||||
menuIsShowed = false
|
||||
end
|
||||
|
||||
Wait(Sleep)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user