Weird.
I put your version in my script and nothing.
I then moved to another resource that I made to test and yet again nothing.
This is the only thing in the resource client.lua
local maxDistance = 15.0
local interactDistance = 3.0
local markersTable = {
{ X = -447.44305419922, Y = 6007.9516601563, Z = 31.716375350952 },
{ X = -448.53857421875, Y = 6009.2690429688, Z = 31.716375350952 },
{ X = 1848.2177734375, Y = 3689.5593261719, Z = 34.267040252686 },
{ X = 369.9228515625, Y = -1607.12976074219, Z = 29.291934967041 },
{ X = 1003.63, Y = 2367.9, Z = 51.73 }
}
Citizen.CreateThread(function()
while true do
local pedX, pedY, pedZ = table.unpack(GetEntityCoords(GetPlayerPed(-1), true))
for k, _ in pairs(markersTable) do
local distance = Vdist(pedX, pedY, pedZ, markersTable[k].X, markersTable[k].Y, markersTable[k].Z)
if distance <= maxDistance then
DrawMarker(1, markersTable[k].X, markersTable[k].Y, markersTable[k].Z - 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 255, 0, 0, 255, 0, 0, 0, 0, nil, nil, 0)
if distance <= interactDistance then
SetNotificationTextEntry("STRING")
AddTextComponentString("<b>Press E To Open The EUP Menu</b>")
DrawNotification(true, false)
if IsControlJustPressed(1, 38) then -- E
print("E pressed")
--mainMenu:Visible(not mainMenu:Visible())
end
end
end
end
Citizen.Wait(0)
end
end)