IsPlayerCrosshairVisible: Difference between revisions
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 13: | Line 13: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
addCommandHandler(" | addCommandHandler("crosshair", function() | ||
local | local crosshairStatus = isPlayerCrosshairVisible() and "visible" or "hidden" | ||
outputChatBox("Your | |||
outputChatBox("Your crosshair is: "..crosshairStatus) | |||
end) | end) | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 08:38, 5 December 2024
Syntax
bool isPlayerCrosshairVisible()
Returns
Returns true if the player has the crosshair visible, false otherwise.
Example
addCommandHandler("crosshair", function() local crosshairStatus = isPlayerCrosshairVisible() and "visible" or "hidden" outputChatBox("Your crosshair is: "..crosshairStatus) end)
See Also
- getLocalPlayer
- getPlayerMapBoundingBox
- getPlayerMapOpacity
- isPlayerMapVisible
- resetBlurLevel
- isPlayerHudComponentVisible
- Shared
- 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