Squirrel/Server/Functions/SpawnClass/GetSpawnClassCount

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Example)
 
Line 1: Line 1:
__NOTOC__
+
{{Squirrel/Title|GetSpawnClassCount}}
 
This function returns the number of different spawn classes on the server.
 
This function returns the number of different spawn classes on the server.
  

Latest revision as of 10:38, 11 October 2010

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

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

[edit] Syntax

  1. int GetSpawnClassCount()

[edit] Arguments

  • none

[edit] 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.

[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