IsPlayerDucked: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
This function checks if the specified [[player]] is ducked (crouched) or not. | |||
This function | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">bool | <syntaxhighlight lang="lua">bool isPlayerDucked ( player thePlayer )</syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*''' | *'''thePlayer''': A [[player]] object referencing the specified player | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | This example checks if a random player is ducked or not, and if so displays a message in the chat box. | ||
if ( | <syntaxhighlight lang="lua">aPlayer = getRandomPlayer ( ) | ||
outputChatBox ( | if ( isPlayerDucked ( aPlayer ) ) | ||
outputChatBox ( getPlayerName ( aPlayer ) .. " is currently crouching." ) | |||
end</syntaxhighlight> | end</syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Player functions}} | {{Player functions}} |
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
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
- getPlayerTeam
- getPlayerBlurLevel
- setPlayerBlurLevel
- getPlayerSerial
- forcePlayerMap
- getPlayerScriptDebugLevel
- getPlayerFromName
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerWantedLevel
- givePlayerMoney
- isPlayerMapForced
- isPlayerNametagShowing
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- takePlayerMoney
- countPlayersInTeam
- getPlayersInTeam
- isVoiceEnabled
- setControlState
- getControlState