Hello, I don’t know if there is something wrong in the lines of code, the resource works perfectly, but when you exit the server and log back in, the markers don’t appear, and I have to press f8 and do an ensure Markers, someone could help me ?
local markerPos1 = vector3(446.49, -1025.26, 28.64)
Citizen.CreateThread(function()
local ped = GetPlayerPed(-1)
while true do
Citizen.Wait(1)
local playerCoords = GetEntityCoords(ped)
local distance = #(playerCoords - markerPos1)
if distance < 10.0 then
DrawMarker(36, markerPos1.x, markerPos1.y, markerPos1.z + 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 220, 220, 220, 15, false, true, 2, nil, nil, false)
else
Citizen.Wait(0)
end
end
end)
local markerPos2 = vector3(471.13, -1024.05, 28.17)
Citizen.CreateThread(function()
local ped = GetPlayerPed(-1)
while true do
Citizen.Wait(0)
local playerCoords = GetEntityCoords(ped)
local distance = #(playerCoords - markerPos2)
if distance < 10.0 then
DrawMarker(36, markerPos2.x, markerPos2.y, markerPos2.z + 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 220, 220, 220, 15, false, true, 2, nil, nil, false)
else
Citizen.Wait(0)
end
end
end)