TextDisplayRemoveObserver: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 5: Line 5:


==Syntax==
==Syntax==
<syntaxhighlight lang="lua">void textDisplayRemoveObserver ( textdisplay textDisplay, player playerToRemove )</syntaxhighlight>
<syntaxhighlight lang="lua">void textDisplayRemoveObserver ( textdisplay display, player playerToRemove )</syntaxhighlight>


===Required Arguments===
===Required Arguments===


* '''textDisplay''': The [[textdisplay]] to add the [[player]] to as an observer.
* '''display''': The [[textdisplay]] to remove the [[player]] from as an observer.
* '''playerToRemove ''': The [[player]] that should be removed from the [[textdisplay]].
* '''playerToRemove''': The [[player]] that should be removed from the [[textdisplay]].


==Example==
==Example==
<syntaxhighlight lang="lua">textDisplay = textCreateDisplay ()
<syntaxhighlight lang="lua">display = textCreateDisplay ( )
textDisplayAddObserver ( textDisplay, player )
textDisplayAddObserver ( display, thePlayer )
textDisplayRemoveObserver ( textDisplay, player )
textDisplayRemoveObserver ( display, thePlayer )
textItem = textCreateTextItem ( "Hello World", 0.5, 0.5, "low", 255, 0, 0, 0, 1.0 )
newtextitem = textCreateTextItem ( "Hello World", 0.5, 0.5, "low", 255, 0, 0, 0, 1.0 )
textDisplayAddText ( textDisplay, textItem )</syntaxhighlight>
textDisplayAddText ( display, newtextitem )
</syntaxhighlight>


==See Also==
==See Also==
{{Text Functions}}
{{Text functions}}

Revision as of 18:19, 21 August 2007

Description

This function removes a player observer of a textdisplay. This stops the player from being able to see textitems that the textdisplay contains.

Syntax

void textDisplayRemoveObserver ( textdisplay display, player playerToRemove )

Required Arguments

Example

display = textCreateDisplay ( )
textDisplayAddObserver ( display, thePlayer )
textDisplayRemoveObserver ( display, thePlayer )
newtextitem = textCreateTextItem ( "Hello World", 0.5, 0.5, "low", 255, 0, 0, 0, 1.0 )
textDisplayAddText ( display, newtextitem )

See Also