GuiGetValue: Difference between revisions

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search
Automatyczna aktualizacja dokumentacji funkcji
 
Complete Lua function catalog
 
Line 32: Line 32:
* Available only in client-side resource scripts.
* Available only in client-side resource scripts.


[[Category:Lua Functions]]
[[Category:Client Functions]]
[[Category:Client Functions]]
[[Category:GUI Functions]]
[[Category:GUI Functions]]

Latest revision as of 09:54, 15 August 2026

guiGetValue

Reads the value of an element in a loaded RML document.

Syntax

string guiGetValue(DocumentHandle document, string elementId)

Parameters

Name Type Required Description
document DocumentHandle yes The owning document.
elementId string yes The target element's id attribute.

Returns

Returns the element value as a string, or nil if it cannot be read.

Examples

Read and print a text input:

local message = guiGetValue(chatDocument, "chat-input")
if message then
    print(message)
end

Notes

  • Available only in client-side resource scripts.