GuiLoadDocument: Difference between revisions
Jump to navigation
Jump to search
Automatyczna aktualizacja dokumentacji funkcji |
Complete Lua function catalog |
||
| Line 31: | Line 31: | ||
* Document paths cannot escape the current resource directory. | * Document paths cannot escape the current resource directory. | ||
[[Category:Lua Functions]] | |||
[[Category:Client Functions]] | [[Category:Client Functions]] | ||
[[Category:GUI Functions]] | [[Category:GUI Functions]] | ||
Latest revision as of 09:54, 15 August 2026
guiLoadDocument
Loads an RML document owned by the current client resource.
Syntax
DocumentHandle guiLoadDocument(string relativePath)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
relativePath |
string |
yes | Path to the RML file relative to the resource root. |
Returns
Returns a document handle on success, or an invalid handle when loading fails.
Examples
Load and display a HUD document:
local hud = guiLoadDocument("ui/hud.rml")
if hud then
guiShow(hud)
end
Notes
- Available only in client-side resource scripts.
- Document paths cannot escape the current resource directory.