Squirrel/Server/Functions/SpawnClass/ID

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Example)
 
Line 1: Line 1:
__NOTOC__
+
{{Squirrel/Title|SpawnClass.ID}}
 
This ''SpawnClass'' class member returns the ID of the given spawn class.
 
This ''SpawnClass'' class member returns the ID of the given spawn class.
  

Latest revision as of 10:38, 11 October 2010

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

This SpawnClass class member returns the ID of the given spawn class.

[edit] Syntax

  1. int SpawnClass.ID

[edit] Arguments

  • none

[edit] Example

  1.  
  2. function onPlayerCommand( player, cmd, text )
  3. {
  4. if ( cmd == "getid" )
  5. {
  6. local id = p_SpawnClass.ID;
  7. MessagePlayer( "The current spawn class id is: " + id, player );
  8. }
  9. }
  10.  

This example will return the id of the spawn class, that we found earlier in FindSpawnClass.

[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