BlowVehicle: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
[[Category:Incomplete]]
__NOTOC__  
__NOTOC__  
This fake function is for use with blah & blah and does blahblahblabhalbhl
This function will blow up a vehicle. This will cause an explosion and will kill the driver and any passengers inside it.


==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool blowVehicle ( element vehicle, [ bool explode=true ] )               
bool blowVehicle ( vehicle vehicleToBlow, [ bool explode=true ] )               
</syntaxhighlight>  
</syntaxhighlight>  


===Required Arguments===  
===Required Arguments===  
*'''argumentName:''' description
*'''vehicleToBlow:''' The vehicle that you wish to blow up.


===Optional Arguments===  
===Optional Arguments===  
{{OptionalArg}}  
{{OptionalArg}}  
*'''argumentName2:''' descriptiona
*'''explode:''' If this argument is ''true'' then the vehicle will explode, otherwise it will just be blown up silently.
*'''argumentName3:''' description


===Returns===
===Returns===
Returns ''true'' if blah, ''false'' otherwise.
Returns ''true'' if the vehicle was blown up, ''false'' if invalid arguments were passed to the function.


==Example==  
==Example==  
This example does...
This example will blow up every vehicle in the game.
<syntaxhighlight lang="lua">
vehicle = getElementsByType ( "vehicle" )
for vehicleKey, vehicleValue in vehicles do
blowVehicle ( vehicleValue )
end
</syntaxhighlight>
 
It is worth noting that the same could be achieved with the following:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--This line does...
root = getRootElement ()
blabhalbalhb --abababa
blowVehicle ( root )
--This line does this...
mooo
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See Also==
{{FunctionArea_Functions}}
{{Vehicle_Functions}}

Revision as of 00:18, 21 May 2006

This function will blow up a vehicle. This will cause an explosion and will kill the driver and any passengers inside it.

Syntax

bool blowVehicle ( vehicle vehicleToBlow, [ bool explode=true ] )              

Required Arguments

  • vehicleToBlow: The vehicle that you wish to blow up.

Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.

  • explode: If this argument is true then the vehicle will explode, otherwise it will just be blown up silently.

Returns

Returns true if the vehicle was blown up, false if invalid arguments were passed to the function.

Example

This example will blow up every vehicle in the game.

vehicle = getElementsByType ( "vehicle" )
for vehicleKey, vehicleValue in vehicles do
	blowVehicle ( vehicleValue )
end

It is worth noting that the same could be achieved with the following:

root = getRootElement ()
blowVehicle ( root )

See Also

Template:Vehicle Functions