guiGetText | Multi Theft Auto: Wiki Skip to content

guiGetText

Client-side
Server-side
Shared

Pair: guiSetText

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 is used to get the text of GUI elements like edit boxes, labels, buttons etc.

Syntax

guiGetText ( )

Code Examples

client

This example gets the text of a pre-made gui element and outputs it to chat box.

-- We create a dummy gui label to get text of
local dummyGUIElement = guiCreateLabel ( 0.45, 0.48, 0.10, 0.04, "Hello world", true )
-- Output the text of the label to chat box
outputChatBox ( "Text in the GUI label: " .. guiGetText ( dummyGUIElement ) )

See Also

GUI Functions