CreateObject

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

Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

Syntax

  1. object = CreateObject( ModelID, Vector )

Arguments

  • ModelID - The Model of the pickup to be created.
  • Vector - The Vector where you want the pickup to be created.

Example

  1.  
  2. function onPlayerCommand( player, cmd, text )
  3. {
  4. if ( cmd == "ramp" )
  5. {
  6. local pos = player.Pos;
  7. CreateObject( 1378, Vector( pos.x, pos.y, pos.z ) );
  8. }
  9. }
  10.  

This command will create a ramp at the player's location.

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