TextCreateDisplay

From Multi Theft Auto: Wiki
Revision as of 00:39, 21 January 2011 by Penise73 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A text display is like a canvas that can contain many items of text. Each display can be seen by multiple observers (players) and each player can see multiple displays.

Syntax

textdisplay textCreateDisplay()

Required Arguments

This function has no arguments.

Example

function showTextDisplay ( player, command )
   local serverDisplay = textCreateDisplay()                             -- create a text display
   textDisplayAddObserver ( serverDisplay, player )                      -- make it visible to a player
   local serverText = textCreateTextItem ( "Hello world!", 0.5, 0.5 )    -- create a text item for the display
   textDisplayAddText ( serverDisplay, serverText )                      -- add it to the display so it is displayed
end
addCommandHandler( "showText", showTextDisplay )

See Also