trying to use taskplaneland but how would I check if the plane has landed in the spot, it seems to be random coords all the time but this is what I have
local ped = GetEntityCoords(GetPlayerPed(-1), true)
local plane = GetEntityCoords(existingVeh, true)
while DoesEntityExist(existingVeh) do
Citizen.Wait(0)
local distance = GetDistanceBetweenCoords(ped.x, ped.y, ped.z, plane.x, plane.y, plane.z, false)
if distance < 100 then
drawTxt("testing to see if this is working", 5000)
end
end
but this isn’t drawing the text, wondering what I am doing wrong here.
local ped = GetEntityCoords(GetPlayerPed(-1), true)
local plane = GetEntityCoords(existingVeh, true)
while DoesEntityExist(existingVeh) do
Citizen.Wait(0)
local distance = GetDistanceBetweenCoords(ped.x, ped.y, ped.z, plane.x, plane.y, plane.z, false)
if distance < 100 then
DrawText1("testing to see if this is working")
end
end
function DrawText1(text)
SetTextFont(0)
SetTextProportional(1)
SetTextScale(0.0, 0.50)
SetTextDropshadow(1, 0, 0, 0, 255)
SetTextEdge(1, 0, 0, 0, 255)
SetTextDropShadow()
SetTextOutline()
SetTextEntry("STRING")
AddTextComponentString(text)
DrawText(0.10, 0.10)
end
also… put the GetEntityCoords for ped and plane in the loop too. It will only call once the way you have it and it will forever use those coords at that one time.