ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client events
  3. onClientWaypointRouteUpdate

Event

onClientWaypointRouteUpdate

ClientBrowserTrilogy Hub only

The game recomputed the GPS route to the waypoint (the line on the radar), or the route disappeared. getPlayerWaypointRoute gives the route's points.

Handler

addEventHandler("onClientWaypointRouteUpdate", root, function(hasRoute, length) ... end)

Parameters

hasRoutebool
true if there is a route.
lengthfloat
The route length in metres, or false.

Source

source is the local player.

Example

addEventHandler("onClientWaypointRouteUpdate", localPlayer, function(hasRoute, length)
    if hasRoute then outputChatBox(("Do celu %.1f km"):format(length / 1000)) end
end)

See also