- Documentation
- Shared functions
- getPlayerWaypoint
Function
getPlayerWaypoint
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
setPlayerWaypointSets the game's GPS waypoint for a player: a target on the radar and map, and a road route while in a vehicle. The game confirms it withonPlayerWaypointSet.removePlayerWaypointRemoves the player's GPS waypoint.onPlayerWaypointSetA player has a new game GPS waypoint (confirmed by their game): placed with a right click on the ESC map or by a script.