OnClientVehicleDrown: 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 starts to drown in a water. ==Parameters== ==Source== The source of this even is the vehicle that is drow...")
 
m (Change <span> to template)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Client event}}
{{Client event}}
__NOTOC__  
__NOTOC__
This event is triggered when a vehicle starts to drown in a water.
 
{{Warning|This event is not implemented in current builds.}}
 
 
This event is triggered when a vehicle starts to drown in water. This event is even triggered when vehicles merely come into contact with water, so not every trigger is an indication of actual drowning.


==Parameters==
==Parameters==
This event has no parameters.


==Source==
==Source==
The source of this even is the [[vehicle]] that is drowning.
The source of this event is the [[vehicle]] that is drowning.


==Example==
==Example==
<syntaxhighlight lang="lua">addEventHandler("onClientVehicleDrown",root,function()
<syntaxhighlight lang="lua">addEventHandler("onClientVehicleDrown",root,function()
     outputChatBox("Vehicle: "..getVehicleName(source).." is drowning!")
     outputChatBox("* A "..getVehicleName(source).." is drowning!")
end)</syntaxhighlight>
end)</syntaxhighlight>



Latest revision as of 13:03, 4 October 2016


[[|link=|]] Warning: This event is not implemented in current builds.


This event is triggered when a vehicle starts to drown in water. This event is even triggered when vehicles merely come into contact with water, so not every trigger is an indication of actual drowning.

Parameters

This event has no parameters.

Source

The source of this event is the vehicle that is drowning.

Example

addEventHandler("onClientVehicleDrown",root,function()
     outputChatBox("* A "..getVehicleName(source).." is drowning!")
end)

See Also

Client vehicle events


Client event functions

Shared