OnVehicleExplode: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 17: | Line 17: | ||
outputChatBox ( " VAGOS' LOAD HAS EXPLODED!" ) --shows the text | outputChatBox ( " VAGOS' LOAD HAS EXPLODED!" ) --shows the text | ||
end | end | ||
addEventHandler ( "onVehicleExplode", | addEventHandler ( "onVehicleExplode", getRootElement(), onVehicleExplode ) --Event is triggered | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Event_functions}} | {{Event_functions}} |
Revision as of 18:42, 5 January 2008
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", getRootElement(), onVehicleExplode ) --Event is triggered
See Also
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled