OnClientPlayerChoke: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 10: Line 10:


==Source==
==Source==
The source of this event is the player who is choking.
The source of this event is the player who is choking. (Local player only)


==Cancel effect==
==Cancel effect==

Revision as of 16:17, 13 August 2011

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, 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 player who is choking. (Local player only)

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, responsiblePed)
	if (weaponID==17) then
		cancelEvent()
	end
end
addEventHandler("onClientPlayerChoke", getLocalPlayer(), cancelTearGasChoking)

See Also

Client player events


Client event functions

Shared