guiSetVisible | Multi Theft Auto: Wiki Skip to content

guiSetVisible

Client-side
Server-side
Shared

Pair: guiGetVisible

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function changes the visibility state of a GUI element.

Syntax

guiSetVisible ( )

Code Examples

client

This example creates a GUI window and changes its visibility every 2 seconds, indefinitely.

-- Create a GUI window called 'myWindow'
myWindow = guiCreateWindow( 0.3, 0.3, 0.5, 0.60, "GUI window title", true )
-- Set a timer to change the window's visibility every 2 seconds, indefinitely
setTimer( function( )
-- We toggle the visibility here by taking the opposite result of guiGetVisible (false => true, true => false), hence toggling its visibility
guiSetVisible( myWindow, not guiGetVisible( myWindow ) )
end, 2000, 0 )

See Also

GUI Functions