Scripting/Server/Events/onPlayerSpawn

The player spawned (normal spawn or player.Spawn()). classID is the index of the <class> they used. Set health, weapons, cash and position here - the position is applied before this event, so player.Pos = ... inside it works as expected.

Syntax

onPlayerSpawn(player, classID)

Arguments

Example

function onPlayerSpawn( player, classID )
{
	player.SetWeapon( WEP_COLT45, 100 );
	player.Health = 100.0;
	MessagePlayer( "You spawned with a pistol.", player );
}

Section: Spawning, deaths and combat

Categories: Server events | Spawning, deaths and combat