OnVehicleExplode: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (See Also for server events) |
||
Line 32: | Line 32: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{See also/Server event|Vehicle events}} | |||
{{ |
Revision as of 17:53, 12 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
vagosVehicle = nil -- This will get called when the vagos vehicle explodes function onVagosVehicleExplode () outputChatBox ( "VAGOS VEHICLE DESTROYED!" ) end -- This is called when THIS resource starts function onThisResourceStart () -- Create the vagos vehicle. A van. vagosVehicle = createVehicle ( 522, 0, 0, 5 ) -- Add its explode handler. When this car explodes, onVagosVehicleExplode is called addEventHandler ( "onVehicleExplode", vagosVehicle, onVagosVehicleExplode ) end --Add the resource start event addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), onThisResourceStart )
See Also
Vehicle events
- onTrailerAttach
- onTrailerDetach
- onVehicleDamage
- onVehicleEnter
- onVehicleExit
- onVehicleExplode
- onVehicleRespawn
- onVehicleStartEnter
- onVehicleStartExit
Event functions
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled