This SpawnClass class member returns the ID of the given spawn class.
- int SpawnClass.ID
- 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.
The call onPlayerCommand was used in in this example. More info about this in the corresponding page.