guiGetProperty | Multi Theft Auto: Wiki Skip to content

guiGetProperty

Client-side
Server-side
Shared

Pair: guiSetProperty

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 gets the value of a specific CEGUI property of a GUI element. For a list of properties and their meaning, see the CEGUI properties page.

Syntax

guiGetProperty ( )

Code Examples

client

This example creates a button when the resource starts and defines a console command that toggles it between enabled (clickable) and disabled (not clickable).

addEventHandler("onClientResourceStart", getResourceRootElement(),
function()
button = guiCreateButton(20, 200, 150, 30, "Test", false)
end
)
addCommandHandler("togglebtn",
function()
local currentState = guiGetProperty(button, "Disabled")
if currentState == "False" then
guiSetProperty(button, "Disabled", "True")
else
guiSetProperty(button, "Disabled", "False")
end
end
)

See Also

GUI Functions