IsPlayerHudComponentVisible

From Multi Theft Auto: Wiki
Revision as of 03:20, 26 September 2012 by Jaysds1 (talk | contribs) (Created page with "{{client function}} __NOTOC__ This function checks if the component is visible. ==Syntax== <syntaxhighlight lang="lua"> bool isPlayerHudComponentVisible ( string component ) </syntaxhighlight> ===Require...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


This function checks if the component is visible.

Syntax

 bool isPlayerHudComponentVisible ( string component ) 

Required

component: The component to check.

Return

Returns true if the component is visible, else false.

Example

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)

See Also