SpawnVehicle: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 5: Line 5:
==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool spawnVehicle ( vehicle theVehicle, x, y, z, rx, ry, rz )
bool spawnVehicle ( vehicle theVehicle, float x, float y, float z, float rx, float ry, float rz )
</syntaxhighlight>  
</syntaxhighlight>  


===Required Arguments===  
===Required Arguments===  
*'''theVehicle:''' The vehicle you wish to respawn
*'''theVehicle:''' The vehicle you wish to spawn
*'''x:''' The x position you wish to spawn the vehicle at
*'''y:''' The x position you wish to spawn the vehicle at
*'''z:''' The x position you wish to spawn the vehicle at
*'''rx:''' The x rotation you wish to spawn the vehicle at
*'''ry:''' The y rotation you wish to spawn the vehicle at
*'''rz:''' The z rotation you wish to spawn the vehicle at


===Returns===
===Returns===
Returns ''true'' if the vehicle respawned successfully, ''false'' if the passed argument does not exist or is not a vehicle.
Returns ''true'' if the vehicle spawned successfully, ''false'' if the passed argument does not exist or is not a vehicle.


==Example==  
==Example==  

Revision as of 02:00, 15 October 2007

Spawns a vehicle at any given position and rotation

Syntax

bool spawnVehicle ( vehicle theVehicle, float x, float y, float z, float rx, float ry, float rz )

Required Arguments

  • theVehicle: The vehicle you wish to spawn
  • x: The x position you wish to spawn the vehicle at
  • y: The x position you wish to spawn the vehicle at
  • z: The x position you wish to spawn the vehicle at
  • rx: The x rotation you wish to spawn the vehicle at
  • ry: The y rotation you wish to spawn the vehicle at
  • rz: The z rotation you wish to spawn the vehicle at

Returns

Returns true if the vehicle spawned successfully, false if the passed argument does not exist or is not a vehicle.

Example

This example does...

--This line does...
blabhalbalhb --abababa
--This line does this...
mooo

See Also