Scripting/Server/Classes/Player/RespawnAt
(v0.5-rc2+) Like player.Spawn() but at the given position (and heading in degrees, default the current one). A dead player is resurrected there - also while the death is held by SetDefaultWastedSettings -, a living one is moved there with full health. Fires onPlayerSpawn.
Syntax
player.RespawnAt(Vector pos [, angle])Arguments
- Vector pos
- float angle (optional)
Example
function onPlayerDeath( player, reason )
{
NewTimer( "respawnAtHospital", 4000, 1, player );
}
function respawnAtHospital( player )
{
player.RespawnAt( Vector( 1144.0, -596.0, 15.0 ), 90.0 );
}Related pages
- player.SetWeapon
- player.ClearWeapons
- player.GetWeaponAmmoAtSlot
- player.SetAnim
- player.RemoveLimb
- player.RemoveFromVehicle
- player.Spawn
- player.ForceToSpawnScreen
- player.CheckFileHash
Section: Player
Categories: Server methods | Player