If you want to teleport them as soon as they go over the blip:
local table = {
{x = 1,y = 1,z = 1},
{x = 2,y = 2,z = 2},
{x = 3,y = 3,z = 3}
}
-- Draw Markers --
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 dis = Vdist(plyCoords.x, plyCoords.y, plyCoords.z, table[k].x, table[k].y, table[k].z)
if dist <= 1.2 then
pP = GetPlayerPed(-1)
SetEntityCoords(pP, x, y, z)
end
end
end
end)
If you want them to press a button when at the blip (E is the example):
local table = {
{x = 1,y = 1,z = 1},
{x = 2,y = 2,z = 2},
{x = 3,y = 3,z = 3}
}
-- Draw Markers --
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 dis = Vdist(plyCoords.x, plyCoords.y, plyCoords.z, table[k].x, table[k].y, table[k].z)
if dist <= 1.2 then
if IsControlJustPressed(1, 51) then
pP = GetPlayerPed(-1)
SetEntityCoords(pP, x, y, z)
end
end
end
end
end)