ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. setPlayerRouteLine

Function

setPlayerRouteLine

Server and clientWorldTrilogy Hub only

Draws a custom route line on the player's ESC map instead of the game's GPS route, e.g. from getVehicleRoute or a walking route. It does not change the GPS target or blips. The line disappears after clearPlayerRouteLine and when the resource stops.

Syntax

bool setPlayerRouteLine(mixed ...)

Arguments

...mixed
Server: player, points[, color]; client: points[, color].

Returns

true on success.

Example

local points = getVehicleRoute(2495, -1667, 13, 1544, -1675, 13)
if points then setPlayerRouteLine(player, points, tocolor(0, 200, 255)) end

Notes

points is { {x, y [, z]}, ... } or { x1, y1, x2, y2, ... }, up to 20000 points; colour from tocolor, yellow by default. The radar still shows the game's route to the GPS target.

See also