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

Function

getPlayerWaypoint

Server and clientBlipsTrilogy Hub only

Returns the player's GPS waypoint, the target they marked on the map or a script set. On the server it is the last point confirmed by the player's game.

Syntax

Server

float, float getPlayerWaypoint(player thePlayer)

Client

float, float getPlayerWaypoint()

Arguments

thePlayerplayer
The player (server only).

Returns

x, y, or false if the player has no waypoint.

Example

addCommandHandler("cel", function(player)
    local x, y = getPlayerWaypoint(player)
    if x then
        outputChatBox(string.format("Twój cel: %.0f, %.0f", x, y), player)
    else
        outputChatBox("Nie masz celu na mapie.", player)
    end
end)

See also