Skip to content

A3D_GetRoutePointCount

imshooter edited this page Oct 23, 2026 · 1 revision

Number of points of a route, from its start to its end.

native A3D_GetRoutePointCount(Route:routeid);

Parameters

Parameter Description
Route:routeid Route to read.

Returns

  • The number of points.
  • 0 when the route does not exist.

Remarks

A route has a point at each node of the paths it follows, and one where it starts and ends. On roads the nodes stand about fifteen metres apart, closer in curves, so a route across the map has some hundreds of points.

Example

stock PrintRoute(Route:routeid) {
    new
        Float:x,
        Float:y,
        Float:z
    ;

    for (new index, count = A3D_GetRoutePointCount(routeid); index != count; ++index) {
        A3D_GetRoutePoint(routeid, index, x, y, z);
        printf("%i: %.1f %.1f %.1f", index, x, y, z);
    }
}

Related

Home

Guides

Reference

Functions

Creating objects
Motion
Placement
Behaviour
Display and data
Rays
Shapes
Players, vehicles and actors
Map probes
Screen
Map objects
Water
Models and surfaces
Rotations and offsets
Vehicles
Routes
Route display
Walking
Callbacks

Clone this wiki locally