local table = {
{x = 27, y = 1039.83, z = -775.31} -- Enter the coords of the maker here --
}
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
for k in pairs(table) do
-- Draw Marker Here --
DrawMarker(1, table[k].x, table[k].y, table[k].z, 0, 0, 0, 0, 0, 0, 1.001, 1.0001, 0.5001, 0, 0, 255, 200, 0, 0, 0, 0)
end
end
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
for k in pairs(table) do
local plyCoords = GetEntityCoords(GetPlayerPed(-1), false)
local dist = Vdist(plyCoords.x, plyCoords.y, plyCoords.z, table[k].x, table[k].y, table[k].z)
if dist <= 1.2 then
DrawTxt("Press E To Do Something")
if IsControlJustPressed(1,51) then
-- do something --
end
end
end
end
end)
function DrawTxt(text)
SetTextFont(0)
SetTextProportional(1)
SetTextScale(0.0, 0.45)
SetTextDropshadow(1, 0, 0, 0, 255)
SetTextEdge(1, 0, 0, 0, 255)
SetTextDropShadow()
SetTextOutline()
SetTextEntry("STRING")
AddTextComponentString(text)
DrawText(0.174, 0.855)
end