diff --git a/client/client.lua b/client/client.lua index 0fad8df..f7b1ae4 100644 --- a/client/client.lua +++ b/client/client.lua @@ -59,8 +59,10 @@ RegisterNUICallback('setNewFloor', function(data, cb) SetTimeout(success and 250 or 500, function () isMoving = false NUI.ToggleNui(false) + State.UIOpen = false end) else isMoving = false + State.UIOpen = false end end) \ No newline at end of file diff --git a/client/zones.lua b/client/zones.lua index cd23ce3..b761d98 100644 --- a/client/zones.lua +++ b/client/zones.lua @@ -7,7 +7,8 @@ local resourceName = GetCurrentResourceName() for elevator, data in pairs(Config.Elevators) do Zones[elevator] = {} for _, v in pairs(data.floors) do - Zones[elevator][#Zones[elevator]+1] = TARGET.AddSphereZone(v.panel, Config.Options.Label, { floor = v.floor, elevator = elevator }, data.vehicle, Config.Options.Icon) + local coords = vector3(v.position.x, v.position.y, v.panel.z) + Zones[elevator][#Zones[elevator]+1] = TARGET.AddSphereZone(coords, Config.Options.Label, { floor = v.floor, elevator = elevator }, data.vehicle, Config.Options.Icon) end end