GuiSetValue

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search

guiSetValue

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

Syntax

bool guiSetValue(DocumentHandle document, string elementId, string value)

Parameters

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

Returns

Returns true when the value is updated; otherwise returns false.

Examples

Fill a text input:

guiSetValue(chatDocument, "chat-input", "Hello world")

Notes

  • Available only in client-side resource scripts.