OnClientPedChoke: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | |||
{{Client event}} | {{Client event}} | ||
{{Needs_Checking|Event is never triggered}} | |||
This event is fired when a ped chokes due to the effect of a weapon such as tear gas grenades, fire extinguishers and spray cans. | This event is fired when a ped chokes due to the effect of a weapon such as tear gas grenades, fire extinguishers and spray cans. | ||
==Parameters== | ==Parameters== | ||
Line 19: | Line 20: | ||
This example disables choking effects from the tear gas grenades. | This example disables choking effects from the tear gas grenades. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
addEventHandler( "onClientPedChoke", getRootElement( ), | |||
function ( ) | |||
cancelEvent( ); | |||
end | |||
); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | </section> |
Latest revision as of 01:57, 2 March 2012
This article needs checking. | |
Reason(s): Event is never triggered |
This event is fired when a ped chokes due to the effect of a weapon such as tear gas grenades, fire extinguishers and spray cans.
Parameters
int weaponID, ped responsiblePed
- weapon: an int representing the ID of the weapon which caused the choking.
- responsiblePed: the ped responsible for causing the choking, possiblly nil.
Source
The source of this event is the ped who is choking.
Cancel effect
If this event is canceled, the ped will not be choked.
Example
Click to collapse [-]
ClientThis example disables choking effects from the tear gas grenades.
addEventHandler( "onClientPedChoke", getRootElement( ), function ( ) cancelEvent( ); end );
See Also
Client ped events
- onClientPedDamage
- onClientPedHeliKilled
- onClientPedHitByWaterCannon
- onClientPedVehicleEnter
- onClientPedVehicleExit
- onClientPedWasted
- onClientPedWeaponFire
- onClientPedStep
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled