Squirrel/Server/Functions/SpawnClass/GetSpawnClassCount

From Liberty Unleashed Wiki
Revision as of 17:29, 8 March 2010 by Force (Talk | contribs)

Jump to: navigation, search

This function returns the number of different spawn classes on the server.

Syntax

  1. int GetSpawnClassCount()

Arguments

  • none

Example

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

This example will return the number of spawn classes.

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