Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(client): Show Selection on Map #45

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions client/apartmentselect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,28 @@ local function inputConfirm(apartmentIndex)
end

local function InputHandler()
local coords = sharedConfig.apartmentOptions[currentButtonID].enter
local blip = AddBlipForCoord(coords.x, coords.y, coords.z)
SetBlipSprite(blip, 40)
ShowTickOnBlip(blip, true)
LockMinimapAngle(0.0)
while true do
SetBigmapActive(true, false)
DisplayRadar(true)
SetRadarAsExteriorThisFrame()
if IsControlJustReleased(0, 188) then
currentButtonID -= 1
if currentButtonID < 1 then currentButtonID = #sharedConfig.apartmentOptions end
coords = sharedConfig.apartmentOptions[currentButtonID].enter
SetBlipCoords(blip, coords.x, coords.y, coords.z)
LockMinimapPosition(coords.x, coords.y)
SetupScaleform()
elseif IsControlJustReleased(0, 187) then
currentButtonID += 1
if currentButtonID > #sharedConfig.apartmentOptions then currentButtonID = 1 end
coords = sharedConfig.apartmentOptions[currentButtonID].enter
SetBlipCoords(blip, coords.x, coords.y, coords.z)
LockMinimapPosition(coords.x, coords.y)
SetupScaleform()
elseif IsControlJustReleased(0, 191) then
local alert = lib.alertDialog({
Expand All @@ -209,6 +223,11 @@ local function InputHandler()
end
Wait(0)
end
SetBigmapActive(false, false)
DisplayRadar(false)
RemoveBlip(blip)
UnlockMinimapPosition()
UnlockMinimapAngle()
StopCamera()
end

Expand Down
Loading