Object.Remove

From Liberty Unleashed Wiki
Revision as of 00:19, 20 October 2010 by Force (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 Object class member removes the given object.

Syntax

  1. bool object.Remove()

Example

This will remove object ID 0 when the player types '/remove'

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "remove" )
  5. {
  6. local pObject = FindObject( 0 );
  7. if ( pObject ) pObject.Remove();
  8. }
  9. return 1;
  10. }
  11.  

Notes

The function FindObject and event onPlayerCommand were used in this example. More info about them in the corresponding pages.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox