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