IsPlayerCrosshairVisible: Difference between revisions
Jump to navigation
Jump to search
Laxante101 (talk | contribs) (→Return) |
Laxante101 (talk | contribs) No edit summary |
||
Line 8: | Line 8: | ||
<syntaxhighlight lang="lua">bool isPlayerCrosshairVisible()</syntaxhighlight> | <syntaxhighlight lang="lua">bool isPlayerCrosshairVisible()</syntaxhighlight> | ||
= | ===Returns=== | ||
'' | Returns ''true'' if the player has the crosshair visible, ''false'' otherwise. | ||
= | ==Example== | ||
function aim() | |||
function aim() | |||
if isPlayerCrosshairVisible() then | if isPlayerCrosshairVisible() then | ||
outputChatBox(" | outputChatBox("succes, aim its true", 0, 255, 0) -- green text if is true | ||
else | else | ||
outputChatBox("your | outputChatBox("erro, your aim is false", 255, 0, 0) -- red text if is false | ||
end | end | ||
end | |||
addCommandHandler("aim", aim) | |||
==See Also== | ==See Also== | ||
{{Client player functions}} | {{Client player functions}} |
Revision as of 21:34, 4 December 2024
Syntax
bool isPlayerCrosshairVisible()
Returns
Returns true if the player has the crosshair visible, false otherwise.
Example
function aim() if isPlayerCrosshairVisible() then outputChatBox("succes, aim its true", 0, 255, 0) -- green text if is true else outputChatBox("erro, your aim is false", 255, 0, 0) -- red text if is false end end addCommandHandler("aim", aim)
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