SpawnClass.ID

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

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

Syntax

  1. int SpawnClass.ID

Arguments

  • none

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.

Notes

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

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox