ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. createWorldLabel

Function

createWorldLabel

Server and clientDrawing (dx)Trilogy Hub only

Creates a permanent 3D label (a "worldlabel" element), drawn by the player's game with no Lua code each frame. Created on the server it is seen by everyone, on the client only by that player. It is visible only in range and in the same dimension and interior.

Syntax

element createWorldLabel(string text, float x, float y, float z [, table options = nil])

Arguments

textstring
The label text.
xfloat
X.
yfloat
Y.
zfloat
Z.
optionstable, optional = nil
Options as in dxDrawText3D, plus attachTo (an element) and offset {x, y, z}.

Returns

The label; remove it with destroyElement.

Example

local label = createWorldLabel("Urząd miasta", 1481, -1771, 19, { maxDistance = 40, color = tocolor(255, 220, 0) })
setElementDimension(label, 0)

See also