OnClientVehicleExplode: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with '{{Client event}} __NOTOC__ This event is triggered when a vehicle explodes. ==Parameters== This event has no parameters. ==Source== The source of this event is the vehicle th…')
 
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 2: Line 2:
__NOTOC__  
__NOTOC__  
This event is triggered when a vehicle explodes.
This event is triggered when a vehicle explodes.
{{Note|This event can not be cancelled.}}


==Parameters==  
==Parameters==  
Line 10: Line 11:


==Example==  
==Example==  
This example will output some text to chat on vehicle explosion
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
-- TODO
addEventHandler("onClientVehicleExplode", root, function()
  local modelname = getVehicleName(source)
  outputChatBox(modelname.." just exploded!")
end)
</syntaxhighlight>
</syntaxhighlight>


Line 19: Line 24:
===Client event functions===
===Client event functions===
{{Client_event_functions}}
{{Client_event_functions}}
 
[[es:onClientVehicleExplode]]
[[Category:Needs_Example]]

Latest revision as of 21:15, 12 August 2023

This event is triggered when a vehicle explodes.

[[{{{image}}}|link=|]] Note: This event can not be cancelled.

Parameters

This event has no parameters.

Source

The source of this event is the vehicle that exploded.

Example

This example will output some text to chat on vehicle explosion

addEventHandler("onClientVehicleExplode", root, function()
  local modelname = getVehicleName(source)
  outputChatBox(modelname.." just exploded!")
end)

See Also

Client vehicle events


Client event functions