SetPlayerSpawnLocation: Difference between revisions

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


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Set the player's spawn point using this function.}}


{{FuncSyntax|SetPlayerSpawnLocation(player, x, y, z, h)}}
{{FuncSyntax|SetPlayerSpawnLocation(player, x, y, z, h)}}
Line 7: Line 7:
{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|player|__EDIT_ME__}}
{{FuncParam|player|__EDIT_ME__}}
{{FuncParam|x|__EDIT_ME__}}
{{FuncParam|x|The X axis}}
{{FuncParam|y|__EDIT_ME__}}
{{FuncParam|y|The Y axis}}
{{FuncParam|z|__EDIT_ME__}}
{{FuncParam|z|The Z axis}}
{{FuncParam|h|__EDIT_ME__}}
{{FuncParam|h|The rotation.}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|This function returns nothing.}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua>
AddEvent("OnPlayerJoin", function(player)
SetPlayerSpawnLocation(player, 125773.000000, 80246.000000, 1645.000000, 90.0)
end)
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
{{Template:ServerFunctions}}

Revision as of 15:38, 19 November 2019

SetPlayerSpawnLocation

Type: Function
Context: Server
Introduced: v1.0

Description

Set the player's spawn point using this function.

Syntax

SetPlayerSpawnLocation(player, x, y, z, h)

Parameters

  • player
    __EDIT_ME__
  • x
    The X axis
  • y
    The Y axis
  • z
    The Z axis
  • h
    The rotation.

Return Value

  • This function returns nothing.

Example

AddEvent("OnPlayerJoin", function(player)
	SetPlayerSpawnLocation(player, 125773.000000, 80246.000000, 1645.000000, 90.0)
end)

See also

index.lua

Game

Colors

Miscellaneous

Time

Server

Explosion

Door

Network

NPC

Object

Package

Event

Pickup

Player

Text3D

Timer

Vehicles

HTTP