onClientPlayerChoke | Multi Theft Auto: Wiki Skip to content

onClientPlayerChoke

Client-side
Server-side
Shared

This event is fired when the local player chokes due to the effect of a weapon such as tear gas grenades, fire extinguishers and spray cans.

Parameters

int weaponID
  • weaponID: an int representing the ID of the weapon which caused the choking.

Source

element: The source of this event is the player who is choking. (Local player only)

Canceling

If this event is canceled, the player will not be choked.

Code Examples

client

This example disables choking effects from the tear gas grenades.

function cancelTearGasChoking(weaponID)
if (weaponID==17) then
cancelEvent()
end
end
addEventHandler("onClientPlayerChoke", getLocalPlayer(), cancelTearGasChoking)

See Also