AddSpawnClass

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function adds a new spawnclass to the game. Used in the spawnscreen

Syntax

  1. 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.

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "addclass" )
  5. {
  6. AddSpawnClass( 100, 1, pPlayer.Pos, pPlayer.Angle, 1, 0 );
  7. }
  8. return 1;
  9. }
  10.  

Notes

The event onPlayerCommand was used in this example. More info about this in the corresponding page.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox