textDisplayAddObserver | Multi Theft Auto: Wiki Skip to content

textDisplayAddObserver

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function adds a player as an observer of a textdisplay. This allows the player to see any textitems that the textdisplay contains.

Syntax

textDisplayAddObserver ( )

Code Examples

server
function MyTestTextFunction ()
display = textCreateDisplay () -- create a new display, store the reference in a variable called display
textDisplayAddObserver ( display, thePlayer ) -- add an observer to it
text = textCreateTextItem ( "Hello World", 0.5, 0.5, "medium", 255, 0, 0, 255, 2, "left", "top", 255) --red text of 24pt at the center of your screen
textDisplayAddText ( display, text ) -- Add the text item to the text display
end