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 |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Info|Function|Server|1.0}} | {{Info|Function|Server|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Sets the spawn location for where the player will spawn after dying. Use [[SetPlayerLocation]] to instantly set a location.}} | ||
{{FuncSyntax|SetPlayerSpawnLocation(player, x, y, z, h)}} | {{FuncSyntax|SetPlayerSpawnLocation(player, x, y, z, h)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|player| | {{FuncParam|player|The player identifier.}} | ||
{{FuncParam|x| | {{FuncParam|x|The X axis}} | ||
{{FuncParam|y| | {{FuncParam|y|The Y axis}} | ||
{{FuncParam|z| | {{FuncParam|z|The Z axis}} | ||
{{FuncParam|h| | {{FuncParam|h|The rotation.}} | ||
{{FuncReturnValue| | {{FuncReturnValue|This function returns nothing.}} | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua> | |||
AddEvent("OnPlayerJoin", function(player) | |||
SetPlayerSpawnLocation(player, 125773.000000, 80246.000000, 1645.000000, 90.0) | |||
end) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{Template:ServerPlayerFunctions}} |
Latest revision as of 15:14, 21 January 2020
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
- GetPlayerBySteamId
- SetPlayerRagdoll
- SetPlayerDimension
- GetPlayerDimension
- SetPlayerPropertyValue
- GetPlayerPropertyValue
- IsValidPlayer
- GetPlayerCount
- GetAllPlayers
- GetNearestPlayer2D
- GetPlayersInRange2D
- GetPlayersInRange3D
- GetStreamedPlayersForPlayer
- SetPlayerName
- GetPlayerName
- GetPlayerSteamId
- GetPlayerNetworkStats
- SetPlayerSpawnLocation
- IsPlayerStreamedIn
- SetPlayerVoiceRange
- SetPlayerVoiceChannel
- IsPlayerVoiceChannel
- SetPlayerVoiceEnabled
- IsPlayerVoiceEnabled
- IsPlayerTalking
- AddPlayerChat
- AddPlayerChatRange
- AddPlayerChatAll
- GetPlayerState
- GetPlayerMovementMode
- GetPlayerMovementSpeed
- IsPlayerAiming
- IsPlayerReloading
- GetPlayerVehicle
- GetPlayerVehicleSeat
- SetPlayerInVehicle
- RemovePlayerFromVehicle
- SetPlayerLocation
- GetPlayerLocation
- SetPlayerWeaponStat
- SetPlayerWeapon
- GetPlayerWeapon
- GetPlayerEquippedWeaponSlot
- EquipPlayerWeaponSlot
- GetPlayerEquippedWeapon
- SetPlayerHeading
- GetPlayerHeading
- SetPlayerSpectate
- IsPlayerDead
- SetPlayerHealth
- GetPlayerHealth
- SetPlayerArmor
- GetPlayerArmor
- SetPlayerRespawnTime
- GetPlayerRespawnTime
- GetPlayerIP
- GetPlayerPing
- KickPlayer
- GetPlayerLocale
- GetPlayerGUID
- GetPlayerGameVersion
- SetPlayerAnimation
- AttachPlayerParachute
- SetPlayerHeadSize
- GetPlayerHeadSize