CreateVehicle

From Liberty Unleashed Wiki
Revision as of 19:33, 28 September 2010 by Juppi (Talk | contribs)

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

This function creates a new vehicle and returns a pointer to it. If the vehicle couldn't be created the function will return null.

Syntax

CreateVehicle can take different lists of parameters:

  1. Vehicle CreateVehicle( int model, Vector pos, float angle, [ int col1, int col2 ] )
  1. Vehicle CreateVehicle( int model, float x, float y, float z, float angle, [ int col1, int col2 ] )

Arguments

  • model - The model of the vehicle. See a list of vehicle model constants here
  • pos - The position of the new vehicle as a vector
  • angle - The rotation of the created vehicle in degrees
  • col1 - Colour 1 of the vehicle. Using -1 will select a random colour specific for that vehicle model. This is an optional argument
  • col2 - Colour 2 of the vehicle. Using -1 will select a random colour specific for that vehicle model. This is an optional argument
  • x, y, z - The position of the new vehicle as floats

Example

This function needs an example. You can help us complete the wiki by writing one, or maybe even more :o
  1.  
  2. -- todo
  3.  

Notes

Example notes and used functions here.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox