IsPlayerDucked: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
Line 4: Line 4:


==Syntax==
==Syntax==
  bool [[IsPlayerDucked]] ( [[player]] )
  bool [[IsPlayerDucked]] ( [[player]] player )


===Required Arguments===
===Required Arguments===
* '''[[player]]''': A player object referencing the specified player  
*'''[[player]]''': A [[player]] object referencing the specified player  


==Example==
==Example==
  player = [[getPlayerFromID]] ( 1 )
  player = [[getPlayerFromID]] ( 1 )
  if ( [[IsPlayerDucked]] ( player ) )
  if ( [[IsPlayerDucked]] ( player ) )
   [[ serverChat ]] ( [[GetPlayerName]] ( player ) , " is currently crouching." )
   [[serverChat]] ( [[GetPlayerName]] ( player ) , " is currently crouching." )
  end
  end

Revision as of 19:53, 25 March 2006

Description

This function returns a boolean value (true or false) depending on whether the specified player is ducked (crouched) or not.

Syntax

bool IsPlayerDucked ( player player )

Required Arguments

Example

player = getPlayerFromID ( 1 )
if ( IsPlayerDucked ( player ) )
  serverChat ( GetPlayerName ( player ) , " is currently crouching." )
end