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
- Player player
- int classID –
classIDis the index of the<class>they used.
Example
function onPlayerSpawn( player, classID )
{
player.SetWeapon( WEP_COLT45, 100 );
player.Health = 100.0;
MessagePlayer( "You spawned with a pistol.", player );
}Related pages
- onPlayerRequestSpawn
- onPlayerDeath
- onPlayerBusted
- onPlayerShoot
- onPlayerActionChange
- onPlayerKill
- onPlayerShotPlayer
- onPlayerWeaponChange
- onPlayerUseDetonator
- onPlayerShootObject
- onPlayerCheat
- onPlayerCLEO
Section: Spawning, deaths and combat
Categories: Server events | Spawning, deaths and combat