Hey I need help. I want to calculate travel distance (just like GPS on minimap do). I need to calculate it once, only when the waypoint on map is created.

I’ve found this:

float GET_PED_WAYPOINT_DISTANCE(Any p0)

float GET_WAYPOINT_DISTANCE_ALONG_ROUTE(char *p0, int p1)

float CALCULATE_TRAVEL_DISTANCE_BETWEEN_POINTS

But I don’t know which parametetrs takes first 2 functions. Last one is working, but sometimes result is different than the minimap-gps distance. (I think it’s working like GetDistanceBetweenCoords).

1. float GET_PED_WAYPOINT_DISTANCE(Any p0) // is the same in the backup I have, but probably a Ped
2. float GET_WAYPOINT_DISTANCE_ALONG_ROUTE(char *p0, int p1) // same too
3. float CALCULATE_TRAVEL_DISTANCE_BETWEEN_POINTS(float x1, float y1, float z1, float x2, float y2, float z2)

would say your best bet would be `CalculateTravelDistanceBetweenPoints(x1, y1, z1, x2, y2, z2)

While testing this function I’ve found out it sometimes gives me wrong distance. Actual distance is 3000m and it gives me randomly something around 3000m or 100 000m…