Squirrel/Client/Events/Player/onClientRequestSpawn
From Liberty Unleashed Wiki
This event is called when a player requests spawn by pressing the spawn key. You can cancel this event and prevent spawning by returning 0.
Syntax
int onClientRequestSpawn( SpawnClass pClass )
Parameters
- pClass - The pointer of the class player has selected
Example
This example will not allow spawning as skin ID 15
function onClientRequestSpawn( pClass ) { if ( pClass.Skin == 15 ) { Message( "You are not allowed to use this skin!" ); return 0; } return 1; }
Notes
The functions Message and SpawnClass.Skin were used in in this example. More info about them in the corresponding pages.
Related Functions
- onClientArmourChange
- onClientCashChange
- onClientCollideWithPlayer
- onClientCommand
- onClientDeath
- onClientFall
- onClientHealthChange
- onClientHurt
- onClientKill
- onClientKeyStateChange
- onClientRequestClass
- onClientRequestSpawn
- onClientShot
- onClientSpawn
- onClientUseDetonator
- onClientWeaponChange
- onPlayerDeath
- onPlayerJoin
- onPlayerKill
- onPlayerPart
- onPlayerSpawn