Set3DTextText: Difference between revisions

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search
Synchronize Lua API documentation
 
Complete Lua function catalog
 
Line 30: Line 30:
* The accepted update is replicated reliably to every connected player.
* The accepted update is replicated reliably to every connected player.


[[Category:Lua Functions]]
[[Category:Server Functions]]
[[Category:Server Functions]]
[[Category:World Functions]]
[[Category:World Functions]]

Latest revision as of 09:54, 15 August 2026

set3DTextText

Changes the text of a replicated world-space label owned by the current resource.

Syntax

bool set3DTextText(string textId, string text)

Parameters

Name Type Required Description
textId string yes The opaque identifier returned by create3DText.
text string yes New valid UTF-8 text containing 1-128 characters and at most 256 bytes.

Returns

Returns true when the label is owned by the current resource and the update is accepted; otherwise returns false.

Examples

Update a counter displayed in the world:

set3DTextText(counterLabel, "Ore delivered: " .. tostring(amount))

Notes

  • Available only in server-side resource scripts.
  • The accepted update is replicated reliably to every connected player.