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

Function

textDisplayIsObserver

ServerText displaysIdentical to MTA:SA

Checks whether a player sees a display.

Syntax

bool textDisplayIsObserver(textdisplay display, player thePlayer)

Arguments

displaytextdisplay
The display.
thePlayerplayer
The player.

Returns

true when they see it.

Example

local display = textCreateDisplay()
addCommandHandler("hud", function(player)
    if textDisplayIsObserver(display, player) then textDisplayRemoveObserver(display, player)
    else textDisplayAddObserver(display, player) end
end)

See also