IsPedChoking

From Multi Theft Auto: Wiki
Revision as of 18:03, 30 March 2008 by Arc (talk | contribs) (New page: __NOTOC__ {{Client function}} This function checks if the specified ped is choking (coughing) or not. This happens as a result of weapons that produce smoke - smoke grenades, fire exti...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function checks if the specified ped is choking (coughing) or not. This happens as a result of weapons that produce smoke - smoke grenades, fire extinguisher and the spray can.

Syntax

bool isPedChoking ( ped thePed )

Required Arguments

  • thePed: The ped you wish to check

Returns

Returns true if the ped is choking, false otherwise.

Example

This example checks if a random player is choking or not, and if so displays a message in the chat box.

aPlayer = getRandomPlayer ( )
if ( isPedChoking ( aPlayer ) ) then
	outputChatBox ( getPlayerName ( aPlayer ) .. " is choking.  Keep away from those cigarettes!" )
end

See Also