IsPlayerChoking

From Multi Theft Auto: Wiki
Revision as of 16:09, 17 November 2007 by Talidan (talk | contribs) (New page: __NOTOC__ {{Server client function}} This function checks if the specified player is choking (coughing) or not. This happens as a result of smoke weapons - e.g. smoke grenades, fire e...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function checks if the specified player is choking (coughing) or not. This happens as a result of smoke weapons - e.g. smoke grenades, fire extinguisher, spray can etc.

Syntax

bool isPlayerChoking ( player thePlayer )

Required Arguments

  • thePlayer: A player object referencing the specified player

Returns

Returns true if the player 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 ( isPlayerChoking ( aPlayer ) ) then
	outputChatBox ( getClientName ( aPlayer ) .. " is choking.  Keep away from those cigarettes!" )
end

See Also

Shared