OnVehicleExplode

From Multi Theft Auto: Wiki
Revision as of 06:09, 30 December 2007 by ChrML (talk | contribs)
Jump to navigation Jump to search

This event is triggered when a vehicle explodes.

Parameters

No arguments

Source

The source of this event is the vehicle that exploded.

Example

function onVehicleExplode () --The function in which when a vehicle explodes
	local VagosVehicleHealth = getVehicleHealth ( VagosVehicle ) --Gets the HP of the Vagos' vehicle
	
	if ( VagosVehicleHealth == 0 ) then --If the vehicle's health is "0" (exploded)
			outputChatBox ( " VAGOS' LOAD HAS EXPLODED!" ) --shows the text
end
addEventHandler ( "onVehicleExplode", root, onVehicleExplode ) --Event is triggered

See Also