IsPlayerDucked: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 7: Line 7:
===Required Arguments===
===Required Arguments===
*'''thePlayer''': A [[player]] object referencing the specified player
*'''thePlayer''': A [[player]] object referencing the specified player
===Returns===
Returns ''true'' if the player is ducked, ''false'' otherwise.


==Example==
==Example==

Revision as of 10:06, 14 August 2006

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 ) )
  outputChatBox ( getPlayerName ( aPlayer ) .. " is currently crouching." )
end

See Also