OnClientPedChoke: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
Line 7: Line 7:
int weaponID, ped responsiblePed
int weaponID, ped responsiblePed
</syntaxhighlight>
</syntaxhighlight>
*'''weapon:''' an [[int]] representing the ID of the weapon which caused the choking.
*'''weaponID:''' an [[int]] representing the ID of the weapon which caused the choking.
*'''responsiblePed:''' the ped responsible for causing the choking, possiblly nil.
*'''responsiblePed:''' the ped responsible for causing the choking, possiblly nil.



Latest revision as of 23:29, 31 May 2025

Dialog-information.png 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
  • weaponID: 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 [-]
Client

This example disables choking effects from the tear gas grenades.

addEventHandler( "onClientPedChoke", getRootElement( ),
    function ( )
        cancelEvent( );
    end
);

See Also

Client ped events


Client event functions