guiSetEnabled | Multi Theft Auto: Wiki Skip to content

guiSetEnabled

Client-side
Server-side
Shared

Pair: guiGetEnabled

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 enables/disables a GUI element. A disabled GUI element can't be used, gets a gray aspect and doesn't receive any events.

Syntax

guiSetEnabled ( )

Code Examples

client
function ChangeMyButtonEnabled ( )
guiSetEnabled ( MyButton, not guiGetEnabled ( MyButton ) ) -- enable button if disabled. Disable if enabled
end
MyGuiWindow = guiCreateWindow(254,206,478,306,"Awesome Gui Window",false) -- Your gui window
MyButton = guiCreateButton(0.477,0.8268,0.1946,0.0784,"Hello World!",true,MyGuiWindow) -- Creates a button in your gui window
ChangeMyButtonEnabled ( ) -- Execute function

See Also

GUI Functions