SetPlayerLocation: Difference between revisions

From Onset Developer Wiki
No edit summary
No edit summary
Line 11: Line 11:
{{FuncParam|z|The Z coordinate of position to put the player at.}}
{{FuncParam|z|The Z coordinate of position to put the player at.}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|Returns '''true''' on success.}}


== Example ==
== Example ==

Revision as of 17:14, 13 December 2019

SetPlayerLocation

Type: Function
Context: Server
Introduced: v1.0

Description

Set the specified client's location.

Syntax

SetPlayerLocation(player, x, y, z)

Parameters

  • player
    The client identifier
  • x
    The X coordinate of position to put the player at.
  • y
    The Y coordinate of position to put the player at.
  • z
    The Z coordinate of position to put the player at.

Return Value

  • Returns true on success.

Example

AddCommand("town", function(player)
	SetPlayerLocation(player, -182821.00, -41675.00, 1160.00)
	AddPlayerChat(player, "Teleported to town.")
end)

See also