IsPlayerHudComponentVisible: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "{{client function}} __NOTOC__ This function checks if the component is visible. ==Syntax== <syntaxhighlight lang="lua"> bool isPlayerHudComponentVisible ( string component ) </syntaxhighlight> ===Require...")
 
Line 1: Line 1:
{{client function}}
__NOTOC__


This function checks if the component is visible.
==Syntax==
<syntaxhighlight lang="lua"> bool isPlayerHudComponentVisible ( string component ) </syntaxhighlight>
===Required===
''' component: ''' The component to check.
===Return===
Returns true if the component is visible, else false.
===Example===
<syntaxhighlight lang="lua">addCommandHandler("isComponent",function(_,theComponent)
    if isPlayerHudComponentVisible(theComponent) then
          outputChatBox("Yes, the component "..theComponent.." is visible.")
    else
          outputChatBox("No, the component "..theComponent.." is not visible or might not exist.")
    end
end)</syntaxhighlight>
==See Also==
{{Client_player_functions}}

Revision as of 10:59, 26 September 2012