Squirrel/Server/Functions/Players/ForceToSpawnScreen

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Example)
 
Line 11: Line 11:
 
== Example ==
 
== Example ==
  
<code lang="squirrel">
+
This example sends the player to the spawn screen when they type '/spawnscreen'.
This example sends the playe to the spawn screen when they type '/spawnscreen'.
+
  
 +
<code lang="squirrel">
 
function onPlayerCommand( pPlayer, szCommand, szText )
 
function onPlayerCommand( pPlayer, szCommand, szText )
 
{
 
{

Latest revision as of 19:04, 1 October 2010

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This Player class member will force the player to the spawn screen.

[edit] Syntax

  1. bool Player.ForceToSpawnScreen()

[edit] Arguments

  • none

[edit] Example

This example sends the player to the spawn screen when they type '/spawnscreen'.

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "spawnscreen" )
  5. {
  6. pPlayer.ForceToSpawnScreen();
  7. }
  8. return 1;
  9. }
  10.  

[edit] Notes

The event onPlayerCommand was used in this example. More info about this in the corresponding page.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox