IsPlayerChoking: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(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...)
 
m (Visual improvement)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Server client function}}
{{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 extinguisher, spray can etc.  
{{Deprecated|isPedChoking}}
 
This function checks if the specified [[player]] is choking (coughing) or not.  This happens as a result of weapons that produce smoke - smoke grenades, fire extinguisher and the spray can.  


==Syntax==
==Syntax==
Line 7: Line 9:


===Required Arguments===
===Required Arguments===
*'''thePlayer''': A [[player]] object referencing the specified player
*'''thePlayer''': The [[player]] you wish to check


===Returns===
===Returns===

Latest revision as of 11:45, 26 June 2014

Emblem-important.png This function is deprecated. This means that its use is discouraged and that it might not exist in future versions.

Please use isPedChoking instead.


This function checks if the specified player 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 isPlayerChoking ( player thePlayer )

Required Arguments

  • thePlayer: The player you wish to check

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