Skip to content

A3D_GetRoutePoint

imshooter edited this page Oct 23, 2026 · 1 revision

Read a point of a route.

native bool:A3D_GetRoutePoint(Route:routeid, index, &Float:x, &Float:y, &Float:z);

Parameters

Parameter Description
Route:routeid Route to read.
index Index of the point, from 0.
&Float:x Point on the X axis.
&Float:y Point on the Y axis.
&Float:z Point on the Z axis.

Returns

  • true when the point was read.
  • false when the route or the point does not exist.

Remarks

The first point is where the start meets the paths and the last where the end meets them. For a walk on the navigation mesh, they are the start and the end themselves, put on the ground. The height is that of the paths of the game, close to the ground.

Example

Puts a race checkpoint on a point of a route, pointing to the next one.

stock bool:ShowCheckpoint(playerid, Route:routeid, index) {
    new
        Float:x,
        Float:y,
        Float:z,
        Float:nextX,
        Float:nextY,
        Float:nextZ
    ;

    if (!A3D_GetRoutePoint(routeid, index, x, y, z)) {
        return false;
    }

    if (!A3D_GetRoutePoint(routeid, index + 1, nextX, nextY, nextZ)) {
        SetPlayerRaceCheckpoint(playerid, CP_TYPE_GROUND_FINISH, x, y, z, x, y, z, 8.0);

        return true;
    }

    SetPlayerRaceCheckpoint(playerid, CP_TYPE_GROUND_NORMAL, x, y, z, nextX, nextY, nextZ, 8.0);

    return true;
}

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