AddSpawnClass
From Liberty Unleashed Wiki
This function adds a new spawnclass to the game. Used in the spawnscreen
Syntax
SpawnClass AddSpawnClass( int skin, int team, Vector pos, float angle, int col, int spawnscreen )
Arguments
- skin - The skin ID to spawn as
- team - The team ID of the spawn
- pos - The location the class will spawn at
- angle - The angle the spawn will be facing when spawned
- col - The spawns colour, used in the nickname and radar blip
- spawnscreen - The spawn screen to use.
Example
This will add a new class to the spawn screen the next time it is visited for each player when '/addclass' is typed.
function onPlayerCommand( pPlayer, szCommand, szText ) { if ( szCommand == "addclass" ) { AddSpawnClass( 100, 1, pPlayer.Pos, pPlayer.Angle, 1, 0 ); } return 1; }
Notes
The event onPlayerCommand was used in this example. More info about this in the corresponding page.