Scripting/Server/Classes/Vehicle/Respawn

Resets health and moves it back to SpawnPos.

Syntax

vehicle.Respawn()

Example

function onPlayerCommand( player, cmd, params )
{
	if ( cmd == "respawn" )
	{
		local veh = player.Vehicle;
		if ( !veh ) return MessagePlayer( "Sit in a vehicle first.", player );
		veh.Respawn();
	}
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Vehicle

Categories: Server methods | Vehicle