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

Function

textDisplayAddObserver

ServerText displaysIdentical to MTA:SA

Shows a display to a player (adds them to the observers).

Syntax

bool textDisplayAddObserver(textdisplay display, player playerToAdd)

Arguments

displaytextdisplay
The display.
playerToAddplayer
The player.

Returns

true on success.

Example

local display = textCreateDisplay()
textDisplayAddText(display, textCreateTextItem("Tryb admina", 0.02, 0.95))
addEventHandler("onPlayerLogin", root, function()
    if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then
        textDisplayAddObserver(display, source)
    end
end)

See also