Squirrel/Server/Functions/SpawnClass/GetSpawnClassCount
From Liberty Unleashed Wiki
(Difference between revisions)
(→Example) |
|||
Line 1: | Line 1: | ||
− | + | {{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
This function returns the number of different spawn classes on the server.
[edit] Syntax
int GetSpawnClassCount()
[edit] Arguments
- none
[edit] Example
function onPlayerCommand( player, cmd, text ) { if ( cmd == "spawncount" ) { local count = GetSpawnClassCount( ); MessagePlayer( "The current spawn class count is: " + count, player ); } }
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.