- Dokumentacja
- Funkcje wspólne
- setPlayerWaypoint
Funkcja
setPlayerWaypoint
Ustawia graczowi punkt GPS gry: cel na radarze i mapie, a w pojeździe także trasę po drogach. Grę potwierdza zdarzeniem onPlayerWaypointSet.
Składnia
Serwer
bool setPlayerWaypoint(player thePlayer, float x, float y)Klient
bool setPlayerWaypoint(float x, float y)Argumenty
thePlayerplayer- Gracz (tylko na serwerze).
xfloat- Pozycja X celu.
yfloat- Pozycja Y celu.
Zwraca
true, jeśli polecenie zostało wysłane.
Przykład
addCommandHandler("dojazd", function(player)
setPlayerWaypoint(player, 1481.0, -1771.0)
outputChatBox("Cel ustawiony: ratusz.", player)
end)