Skip to content

A3D_GetRoutePoints

imshooter edited this page Oct 23, 2026 · 1 revision

Copy points of a route into three arrays.

native A3D_GetRoutePoints(
    Route:routeid,
    Float:x[],
    Float:y[],
    Float:z[],
    start = 0,
    size = sizeof (x)
);

Parameters

Parameter Description Default
Route:routeid Route to read.
Float:x[] Points on the X axis.
Float:y[] Points on the Y axis.
Float:z[] Points on the Z axis.
start Index of the first point to copy. 0
size Room in each array. sizeof (x)

Returns

  • The number of points copied.

Remarks

One call copies as many points as fit, which is faster than a call for each point of a long route. start and size copy a route in parts.

Example

Lines a route with traffic cones.

stock LineWithCones(Route:routeid) {
    new
        Float:x[256],
        Float:y[256],
        Float:z[256],
        count = A3D_GetRoutePoints(routeid, x, y, z)
    ;

    for (new index; index < count; index += 8) {
        CreateObject(1238, x[index], y[index], z[index], 0.0, 0.0, 0.0);
    }
}

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