Squirrel/Server/Functions/Players/Spawn

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with '{{Squirrel/Title|Player.Spawn}} This function forces a player to spawn. == Arguments == * ''' player ''' - The player to be spawned. == Example == This command will make your…')
 
 
Line 1: Line 1:
 
{{Squirrel/Title|Player.Spawn}}
 
{{Squirrel/Title|Player.Spawn}}
 
This function forces a player to spawn.
 
This function forces a player to spawn.
 +
 +
== Syntax ==
 +
 +
<code>bool Player.Spawn( [ SpawnClass spawn ] )</code>
  
 
== Arguments ==
 
== Arguments ==
  
* ''' player ''' - The player to be spawned.
+
* '''spawn''' - This is an optional pointer to a spawn class which you wish the player to use. If this argument is not used the player will use their current class
  
 
== Example ==
 
== Example ==

Latest revision as of 00:31, 25 October 2010

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

This function forces a player to spawn.

[edit] Syntax

  1. bool Player.Spawn( [ SpawnClass spawn ] )

[edit] Arguments

  • spawn - This is an optional pointer to a spawn class which you wish the player to use. If this argument is not used the player will use their current class

[edit] Example

This command will make yourself spawn.

  1.  
  2. function onPlayerCommand( player, cmd, text )
  3. {
  4. if ( cmd == "spawnme" )
  5. {
  6. player.Spawn();
  7. }
  8. return 1;
  9. }
  10.  

[edit] Notes

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

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox