textCreateTextItem | Multi Theft Auto: Wiki Skip to content

textCreateTextItem

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 creates a text item. A text item represents a single area of text, much like a label does in standard GUI programming. A text item can only be seen by players if it is added to a textdisplay using textDisplayAddText. Each text item can be added to multiple displays, if need be.

Syntax

textCreateTextItem ( )

Code Examples

server
myDisplay = textCreateDisplay () -- create a display
textDisplayAddObserver ( myDisplay, myPlayer ) -- make it visible to a player
myTextItem = textCreateTextItem ( "Hello world!", 0.5, 0.5 ) -- create text item for the display
textDisplayAddText ( myDisplay, myTextItem ) -- add created item to text display so it is displayed