IsPlayerDucked: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
{{Server client function}}
{{Server client function}}
{{Deprecated}}
{{Deprecated}}
Please use [[isPedDucked]]
This function checks if the specified [[player]] is ducked (crouched) or not.
This function checks if the specified [[player]] is ducked (crouched) or not.



Revision as of 20:53, 20 April 2011

Emblem-important.png This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be a more generic way to perform what it does.


Please use isPedDucked

This function checks if the specified player is ducked (crouched) or not.

Syntax

bool isPlayerDucked ( player thePlayer )

Required Arguments

  • thePlayer: A player object referencing the specified player

Returns

Returns true if the player is ducked, false otherwise.

Example

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

aPlayer = getRandomPlayer ( )
if ( isPlayerDucked ( aPlayer ) ) then
	outputChatBox ( getClientName ( aPlayer ) .. " is currently crouching." )
end

See Also