Repository navigation
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);| 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. |
-
truewhen the point was read. -
falsewhen the route or the point does not exist.
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.
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;
}- A3D_GetRoutePointCount: Number of points of a route, from its start to its end.
- A3D_GetRoutePoints: Copy points of a route into three arrays.
- A3D_GetRouteProgress: Find where a point is along a route: the distance left, the distance from the route and the next turn.
3DAndreas 0.7.0 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Physics objects
- Model settings
- World queries
- The screen
- Routes
- Navigation mesh
- Map database
- Coming from ColAndreas
- Performance
Reference
Functions