Hello! I’ve created a script which like any normal /tpm script. Although there is 1 mini problem, it doesn’t work on longer distances. here’s the script:
RegisterCommand( "tpm", function()
local waypointHandle = GetFirstBlipInfoId( 8 )
local ped = GetPlayerPed( -1 )
local blipCoords = GetBlipCoords( waypointHandle )
if DoesBlipExist( waypointHandle ) then
for height = 1, 1000 do
local foundGround = GetGroundZFor_3dCoord( blipCoords.x, blipCoords.y, height + 0.0 )
if foundGround then
SetEntityCoords( ped, blipCoords.x, blipCoords.y, height + 0.0, false, false, false, false )
break
end
end
else
TriggerEvent( "aq:notify", "~y~Place a waypoint." )
end
print( blipCoords )
end)
Hi there! As I’ve added to the native reference, this native doesn’t work on long distances (since it can only calculate the coordinates if the terrain is within the client’s render distance). You’ll need to teleport the player to the area first, then check for the ground elevation.