Skip to content

A3D_GetRouteTime

imshooter edited this page Oct 23, 2026 · 1 revision

Time a route takes, in seconds.

Vehicles drive at 36 metres a second on highways, 22 on other roads and 14 on the roads the traffic leaves alone, and lose the time the turns cost. Boats sail at 15 metres a second and pedestrians run at 5.

native Float:A3D_GetRouteTime(Route:routeid);

Parameters

Parameter Description
Route:routeid Route to measure.

Returns

  • The time.
  • 0.0 when the route does not exist.

Remarks

The time is an estimate for a driver who keeps to the speeds of Route types and loses the time each turn costs: two seconds to the right, five to the left and thirty to turn back. Players drive faster than that in an empty city and slower in a crowded one, so the time suits comparing routes and giving an idea of the wait, more than a promise.

Example

stock bool:InTimeFor(Route:routeid, seconds) {
    return A3D_GetRouteTime(routeid) <= float(seconds);
}

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