SetPlayerSpawnLocation: Difference between revisions

From Onset Developer Wiki
No edit summary
No edit summary
 
Line 22: Line 22:


{{RelatedFunctions}}
{{RelatedFunctions}}
{{Template:ServerFunctions}}
{{Template:ServerPlayerFunctions}}

Latest revision as of 15:14, 21 January 2020

SetPlayerSpawnLocation

Type: Function
Context: Server
Introduced: v1.0

Description

Sets the spawn location for where the player will spawn after dying. Use SetPlayerLocation to instantly set a location.

Syntax

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

Parameters

  • player
    The player identifier.
  • 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