Squirrel/Client/Events/Player/onClientRequestSpawn
From Liberty Unleashed Wiki
(Difference between revisions)
(New page: __NOTOC__ 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 == <code>int onClientReque...) |
m (silly me) |
||
Line 29: | Line 29: | ||
=== Notes === | === Notes === | ||
− | The | + | The functions [[Squirrel/Client/Functions/Messages/Message|Message]] and [[Squirrel/Client/Functions/SpawnClass/Skin|SpawnClass.Skin]] were used in in this example. More info about them in the corresponding pages. |
== Related Functions == | == Related Functions == | ||
{{Squirrel/Client/Events/Player}} | {{Squirrel/Client/Events/Player}} |
Latest revision as of 13:08, 30 March 2010
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.
[edit] Syntax
int onClientRequestSpawn( SpawnClass pClass )
[edit] Parameters
- pClass - The pointer of the class player has selected
[edit] 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; }
[edit] Notes
The functions Message and SpawnClass.Skin were used in in this example. More info about them in the corresponding pages.
[edit] Related Functions
- onClientArmourChange
- onClientCashChange
- onClientCollideWithPlayer
- onClientCommand
- onClientDeath
- onClientFall
- onClientHealthChange
- onClientHurt
- onClientKill
- onClientKeyStateChange
- onClientRequestClass
- onClientRequestSpawn
- onClientShot
- onClientSpawn
- onClientUseDetonator
- onClientWeaponChange
- onPlayerDeath
- onPlayerJoin
- onPlayerKill
- onPlayerPart
- onPlayerSpawn