ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. textItemSetText

Function

textItemSetText

ServerText displaysIdentical to MTA:SA

Changes a text item's text for all observers (e.g. a countdown).

Syntax

bool textItemSetText(textitem theTextitem, string text)

Arguments

theTextitemtextitem
The text item.
textstring
The new text.

Returns

true on success.

Example

local display = textCreateDisplay()
local item = textCreateTextItem("10", 0.5, 0.4, "high", 255, 255, 255, 255, 3, "center", "center")
textDisplayAddText(display, item)
local left = 10
setTimer(function()
    left = left - 1
    textItemSetText(item, left > 0 and tostring(left) or "START!")
end, 1000, 10)

See also