SetPlayerLocation: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|SetPlayerLocation(player, x, y, z)}} {{FuncParameters}} {{FuncParam|player|__EDIT_ME__}} {{FuncPar..."
 
28days (talk | contribs)
No edit summary
Line 1: Line 1:
{{Info|Function|Server|1.0}}
{{Info|Function|Server|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Set the specified client's location.}}


{{FuncSyntax|SetPlayerLocation(player, x, y, z)}}
{{FuncSyntax|SetPlayerLocation(player, x, y, z)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|player|__EDIT_ME__}}
{{FuncParam|player|The client identifier}}
{{FuncParam|x|__EDIT_ME__}}
{{FuncParam|x|The X coordinate of position to put the player at.}}
{{FuncParam|y|__EDIT_ME__}}
{{FuncParam|y|The Y coordinate of position to put the player at.}}
{{FuncParam|z|__EDIT_ME__}}
{{FuncParam|z|The Z coordinate of position to put the player at.}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|__EDIT_ME__}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua">
AddCommand("town", function(player)
SetPlayerLocation(player, -182821.00, -41675.00, 1160.00)
AddPlayerChat(player, "Teleported to town.")
end)
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
* [[GetPlayerLocation]]

Revision as of 14:47, 14 November 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

  • __EDIT_ME__

Example

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

See also