ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. dxDrawText3D

Function

dxDrawText3D

ClientDrawing (dx)Trilogy Hub only

Draws a label at a point in the world. Call it from onClientRender. The label shrinks with distance and fades out at the end of the range.

Syntax

bool dxDrawText3D(string text, float x, float y, float z [, table options = nil])

Arguments

textstring
The text.
xfloat
X.
yfloat
Y.
zfloat
Z.
optionstable, optional = nil
maxDistance (20), fadeDistance (5), scale (1), minScale (0.5), fixedScale, font, color, shadow (true), colorCoded, checkLineOfSight.

Returns

true if the label was drawn.

Example

addEventHandler("onClientRender", root, function()
    dxDrawText3D("#ffcc00Bankomat", 1500, -1680, 15, { colorCoded = true, maxDistance = 15 })
end)

Notes

For permanent labels createWorldLabel is better: it needs no code every frame.

See also