OnClientPedChoke

From Multi Theft Auto: Wiki
Revision as of 23:29, 9 June 2009 by Cazomino05 (talk | contribs) (added onClientPedChoke)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 [-]
Client

This example disables choking effects from the tear gas grenades.

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

See Also

Client player events


Client event functions