- Documentation
- Server functions
- textDisplayAddObserver
Function
textDisplayAddObserver
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)