FindSpawnClass
From Liberty Unleashed Wiki
This function finds a SpawnClass from an ID and returns the pointer. If no spawn class is found, null will be returned.
Syntax
SpawnClass FindSpawnClass( int id )
Arguments
- id - The ID of the spawn class to be found
function onPlayerCommand( player, cmd, text ) { if ( cmd == "findclass" ) { if ( text ) p_SpawnClass <- FindSpawnClass( text.tointeger() ); } }
This example will try and find a spawn class associated with the specified id.
Notes
The call onPlayerCommand was used in in this example. More info about this in the corresponding page.