OnClientPlayerChoke

From Multi Theft Auto: Wiki
Revision as of 01:38, 22 May 2009 by Fenix1053 (talk | contribs) (New page: {{Client event}} __NOTOC__ This event is fired when a player chokes due to the effect of a weapon such as tear gas grenades, fire extinguishers and spray cans. ==Parameters== <syntaxhighlight lang="lua">...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

Parameters

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

Source

The source of this event is the player who is choking.

Cancel effect

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

Example

Click to collapse [-]
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

Client player events


Client event functions