IsPlayerDucked: Difference between revisions
Jump to navigation
Jump to search
(→Syntax) |
m (Visual improvement) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | |||
{{Deprecated|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. | ||
Line 13: | Line 16: | ||
==Example== | ==Example== | ||
This example checks if a random player is ducked or not, and if so displays a message in the chat box. | This example checks if a random player is ducked or not, and if so displays a message in the chat box. | ||
<syntaxhighlight lang="lua">aPlayer = getRandomPlayer ( ) | <syntaxhighlight lang="lua"> | ||
if ( isPlayerDucked ( aPlayer ) ) | aPlayer = getRandomPlayer ( ) | ||
if ( isPlayerDucked ( aPlayer ) ) then | |||
end</syntaxhighlight> | outputChatBox ( getClientName ( aPlayer ) .. " is currently crouching." ) | ||
end | |||
</syntaxhighlight> | |||
==See Also== | ==See Also== | ||
{{Player functions}} | {{Player functions}} |
Latest revision as of 11:46, 26 June 2014
This function is deprecated. This means that its use is discouraged and that it might not exist in future versions. | |
Please use isPedDucked instead. |
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
- 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