blowVehicle | Multi Theft Auto: Wiki Skip to content

blowVehicle

Client-side
Server-side
Shared
Needs checking

This function was partially migrated from the old wiki. Please review manually:

  • Missing section: Client Class Example

Pair: isVehicleBlown

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


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

OOP Syntax Help! I don't understand this!

  • Method:vehicle:blow(...)
  • Variable: .blown

Syntax

bool blowVehicle ( vehicle vehicleToBlow )
Required Arguments
  • vehicleToBlow: the vehicle that you wish to blow up.

Returns

  • bool: value

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

Code Examples

server

This example will blow up every vehicle in the game.

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

See Also

Vehicle Functions