FindSpawnClass

From Liberty Unleashed Wiki
Revision as of 10:37, 11 October 2010 by VRocker (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function finds a SpawnClass from an ID and returns the pointer. If no spawn class is found, null will be returned.

Syntax

  1. SpawnClass FindSpawnClass( int id )

Arguments

  • id - The ID of the spawn class to be found
  1.  
  2. function onPlayerCommand( player, cmd, text )
  3. {
  4. if ( cmd == "findclass" )
  5. {
  6. if ( text ) p_SpawnClass <- FindSpawnClass( text.tointeger() );
  7. }
  8. }
  9.  

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.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox