OnClientVehicleDrown: Difference between revisions
Jump to navigation
Jump to search
m (→Parameters) |
(Fixed a typo and added additional information.) |
||
Line 1: | Line 1: | ||
{{Client event}} | {{Client event}} | ||
__NOTOC__ | __NOTOC__ | ||
This event is triggered when a vehicle starts to drown in | 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== | ||
Line 7: | Line 7: | ||
==Source== | ==Source== | ||
The source of this | 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(" | outputChatBox("* A "..getVehicleName(source).." is drowning!") | ||
end)</syntaxhighlight> | end)</syntaxhighlight> | ||
Revision as of 20:07, 27 September 2012
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
- onClientTrailerAttach
- onClientTrailerDetach
- onClientVehicleCollision
- onClientVehicleDamage
- onClientVehicleEnter
- onClientVehicleExit
- onClientVehicleExplode
- onClientVehicleNitroStateChange
- onClientVehicleRespawn
- onClientVehicleStartEnter
- onClientVehicleStartExit
- onClientVehicleWeaponHit
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled