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

Example

function onPlayerDeath( player, reason )
{
	NewTimer( "respawnAtHospital", 4000, 1, player );
}

function respawnAtHospital( player )
{
	player.RespawnAt( Vector( 1144.0, -596.0, 15.0 ), 90.0 );
}

Section: Player

Categories: Server methods | Player