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

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

  • bool: value

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