- Documentation
- Shared functions
- isPlayerHudComponentVisible
Function
isPlayerHudComponentVisible
Checks whether a game HUD component is visible for the player (according to setPlayerHudComponentVisible). A component with no setting of its own follows "all".
Syntax
Server
bool isPlayerHudComponentVisible(player thePlayer, string component)Client
bool isPlayerHudComponentVisible(string component)Arguments
thePlayerplayer- The player (server only).Different type in MTA:SA: string component
componentstring- Component name (see
getHudComponentNames).Not in MTA:SA
Differences from MTA:SA
- Arguments in a different colour differ from MTA:SA.
In MTA:SA
isPlayerHudComponentVisible(string component)Returns
true if visible; false also for an unknown component.
Example
if isPlayerHudComponentVisible(player, "radar") then
setPlayerHudComponentVisible(player, "radar", false)
end