<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Imr-prestege</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Imr-prestege"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Imr-prestege"/>
	<updated>2026-05-24T11:26:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreateTextItem&amp;diff=35566</id>
		<title>CreateTextItem</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreateTextItem&amp;diff=35566"/>
		<updated>2013-04-25T20:35:05Z</updated>

		<summary type="html">&lt;p&gt;Imr-prestege: Example &amp;lt; &amp;gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pageclass class=&amp;quot;#228B22&amp;quot; subcaption=&amp;quot;Useful Function&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt;&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
'''With this function you can create any text you want with any size color visible to who you want and this function server side only!'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool CreateTextItem (  player playerToAdd , time, int red = 255, int green = 255, int blue = 255, float scale = 1, string text, [ float x, float y, string alignX = &amp;quot;left&amp;quot;, string alignY = &amp;quot;top&amp;quot;] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
&lt;br /&gt;
* '''playerToAdd: The player that should observe the textdisplay.'''&lt;br /&gt;
* '''time: The number of times you want to the remove The textdisplay ,number of milliseconds (the minimum is 50)(1000 milliseconds = 1 second)'''&lt;br /&gt;
* '''red: A value between 0 and 255 indicating how red the text should be.'''&lt;br /&gt;
* '''green: A value between 0 and 255 indicating how green the text should be.'''&lt;br /&gt;
* '''blue: A value between 0 and 255 indicating how blue the text should be.'''&lt;br /&gt;
* '''scale: A floating point value indicating the scale of the text. The default is 1.0, which is around 12pt.'''&lt;br /&gt;
* '''text: A string of text you want to display'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
&lt;br /&gt;
* x: A floating point number between 0.0 and 1.0 indicating how far across the screen the text should be shown, as a percentage of the width, from the left hand side.&lt;br /&gt;
* y: A floating point number between 0.0 and 1.0 indicating how far down the screen the text should be shown, as a percentage of the height,  from the top.&lt;br /&gt;
* scale: A floating point value indicating the scale of the text. The default is 1.0, which is around 12pt.&lt;br /&gt;
* alignX: A string representing the X-alignment of the text. (&amp;quot;left&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;right&amp;quot;)&lt;br /&gt;
* alignY: A string representing the Y-alignment of the text. (&amp;quot;top&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;bottom&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Important Note===&lt;br /&gt;
* '''You can't use ''''getRootElement()'''' element you will get some errors you have to use getElementsByType to get All Players!'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function CreateTextItem ( player, time, r, g, b, scale, text, x, y, alignX, alignY)&lt;br /&gt;
	if not player or not time or not text then return end&lt;br /&gt;
	if not tonumber(r) and not tonumber(g) and not tonumber(b) then r, g, b = 255, 0, 0 end&lt;br /&gt;
	if not scale then scale = 1 end&lt;br /&gt;
	if ( isElement( player ) and type ( text ) == 'string' and tonumber( time) ) then&lt;br /&gt;
		local Display = textCreateDisplay ()&lt;br /&gt;
		local newtextItem = textCreateTextItem ( text, x or 0.5, y or 0.5, 2, r, g, b, 255, scale, alignX or &amp;quot;center&amp;quot;, alignY or &amp;quot;center&amp;quot; )&lt;br /&gt;
		textDisplayAddText ( Display, newtextItem )&lt;br /&gt;
		textDisplayAddObserver ( Display, player )&lt;br /&gt;
		setTimer(textDestroyTextItem, time, 1, newtextItem)&lt;br /&gt;
		setTimer(textDestroyDisplay, time, 1, Display)&lt;br /&gt;
	end	&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server Example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This Example creates a text item. A text item represents a single area of text, much like a label !&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;Create&amp;quot;,&lt;br /&gt;
function ( element , cmd , item ) &lt;br /&gt;
    local Text = tostring ( item )&lt;br /&gt;
    if ( Text ) then&lt;br /&gt;
        CreateTextItem ( element, 5000, 255, 255, 0, 5,Text )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server Full Example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This Example creates a text item. A text item represents a single area of text, much like a label !&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function CreateTextItem ( player, time, r, g, b, scale, text, x, y, alignX, alignY)&lt;br /&gt;
	if not player or not time or not text then return end&lt;br /&gt;
	if not r and not g and not b then r, g, b = 255, 0, 0 end&lt;br /&gt;
	if not scale then scale = 1 end&lt;br /&gt;
	if ( isElement( player ) and type ( text ) == 'string' and tonumber( time) ) then&lt;br /&gt;
		local Display = textCreateDisplay ()&lt;br /&gt;
		local newtextItem = textCreateTextItem ( text, x or 0.5, y or 0.5, 2, r, g, b, 255, scale, alignX or &amp;quot;center&amp;quot;, alignY or &amp;quot;center&amp;quot; )&lt;br /&gt;
		textDisplayAddText ( Display, newtextItem )&lt;br /&gt;
		textDisplayAddObserver ( Display, player )&lt;br /&gt;
		setTimer(textDestroyTextItem, time, 1, newtextItem)&lt;br /&gt;
		setTimer(textDestroyDisplay, time, 1, Display)&lt;br /&gt;
	end	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;Test&amp;quot;,&lt;br /&gt;
function (  ) &lt;br /&gt;
		for _,v in ipairs ( getElementsByType(&amp;quot;player&amp;quot;) ) do&lt;br /&gt;
		CreateTextItem ( v, 5000, 255, 255, 0, 5,&amp;quot;Test Text&amp;quot; )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Author : '''Mr.Pres[T]ege'''. All Copy Rights Received To '''Multitheftauto''' .&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>Imr-prestege</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreateTextItem&amp;diff=35565</id>
		<title>CreateTextItem</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreateTextItem&amp;diff=35565"/>
		<updated>2013-04-25T20:32:07Z</updated>

		<summary type="html">&lt;p&gt;Imr-prestege: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pageclass class=&amp;quot;#228B22&amp;quot; subcaption=&amp;quot;Useful Function&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt;&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
'''With this function you can create any text you want with any size color visible to who you want and this function server side only!'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool CreateTextItem (  player playerToAdd , time, int red = 255, int green = 255, int blue = 255, float scale = 1, string text, [ float x, float y, string alignX = &amp;quot;left&amp;quot;, string alignY = &amp;quot;top&amp;quot;] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
&lt;br /&gt;
* '''playerToAdd: The player that should observe the textdisplay.'''&lt;br /&gt;
* '''time: The number of times you want to the remove The textdisplay ,number of milliseconds (the minimum is 50)(1000 milliseconds = 1 second)'''&lt;br /&gt;
* '''red: A value between 0 and 255 indicating how red the text should be.'''&lt;br /&gt;
* '''green: A value between 0 and 255 indicating how green the text should be.'''&lt;br /&gt;
* '''blue: A value between 0 and 255 indicating how blue the text should be.'''&lt;br /&gt;
* '''scale: A floating point value indicating the scale of the text. The default is 1.0, which is around 12pt.'''&lt;br /&gt;
* '''text: A string of text you want to display'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
&lt;br /&gt;
* x: A floating point number between 0.0 and 1.0 indicating how far across the screen the text should be shown, as a percentage of the width, from the left hand side.&lt;br /&gt;
* y: A floating point number between 0.0 and 1.0 indicating how far down the screen the text should be shown, as a percentage of the height,  from the top.&lt;br /&gt;
* scale: A floating point value indicating the scale of the text. The default is 1.0, which is around 12pt.&lt;br /&gt;
* alignX: A string representing the X-alignment of the text. (&amp;quot;left&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;right&amp;quot;)&lt;br /&gt;
* alignY: A string representing the Y-alignment of the text. (&amp;quot;top&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;bottom&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
===Important Note===&lt;br /&gt;
* '''You can't use ''''getRootElement()'''' element you will get some errors you have to use getElementsByType to get All Players!'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function CreateTextItem ( player, time, r, g, b, scale, text, x, y, alignX, alignY)&lt;br /&gt;
    if not player or not time or not text then return end&lt;br /&gt;
    if not r and not g and not b then r, g, b = 255, 0, 0 end&lt;br /&gt;
    if not scale then scale = 1 end&lt;br /&gt;
    if ( isElement( player ) and type ( text ) == 'string' and tonumber( time) ) then&lt;br /&gt;
        local Display = textCreateDisplay ()&lt;br /&gt;
        local newtextItem = textCreateTextItem ( text, x or 0.5, y or 0.5, 2, r, g, b, 255, scale, alignX or &amp;quot;center&amp;quot;, alignY or &amp;quot;center&amp;quot; )&lt;br /&gt;
        textDisplayAddText ( Display, newtextItem )&lt;br /&gt;
        textDisplayAddObserver ( Display, player )&lt;br /&gt;
        setTimer(textDestroyTextItem, time, 1, newtextItem)&lt;br /&gt;
        setTimer(textDestroyDisplay, time, 1, Display)&lt;br /&gt;
    end &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server Example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This Example creates a text item. A text item represents a single area of text, much like a label !&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;Create&amp;quot;,&lt;br /&gt;
function ( element , cmd , item ) &lt;br /&gt;
    local Text = tostring ( item )&lt;br /&gt;
    if ( Text ) then&lt;br /&gt;
        CreateTextItem ( element, 5000, 255, 255, 0, 5,Text )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server Full Example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This Example creates a text item. A text item represents a single area of text, much like a label !&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function CreateTextItem ( player, time, r, g, b, scale, text, x, y, alignX, alignY)&lt;br /&gt;
	if not player or not time or not text then return end&lt;br /&gt;
	if not r and not g and not b then r, g, b = 255, 0, 0 end&lt;br /&gt;
	if not scale then scale = 1 end&lt;br /&gt;
	if ( isElement( player ) and type ( text ) == 'string' and tonumber( time) ) then&lt;br /&gt;
		local Display = textCreateDisplay ()&lt;br /&gt;
		local newtextItem = textCreateTextItem ( text, x or 0.5, y or 0.5, 2, r, g, b, 255, scale, alignX or &amp;quot;center&amp;quot;, alignY or &amp;quot;center&amp;quot; )&lt;br /&gt;
		textDisplayAddText ( Display, newtextItem )&lt;br /&gt;
		textDisplayAddObserver ( Display, player )&lt;br /&gt;
		setTimer(textDestroyTextItem, time, 1, newtextItem)&lt;br /&gt;
		setTimer(textDestroyDisplay, time, 1, Display)&lt;br /&gt;
	end	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;Test&amp;quot;,&lt;br /&gt;
function (  ) &lt;br /&gt;
		for _,v in ipairs ( getElementsByType(&amp;quot;player&amp;quot;) ) do&lt;br /&gt;
		CreateTextItem ( v, 5000, 255, 255, 0, 5,&amp;quot;Test Text&amp;quot; )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Author : '''Mr.Pres[T]ege'''. All Copy Rights Received To '''Multitheftauto''' .&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>Imr-prestege</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreateTextItem&amp;diff=35564</id>
		<title>CreateTextItem</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreateTextItem&amp;diff=35564"/>
		<updated>2013-04-25T20:31:12Z</updated>

		<summary type="html">&lt;p&gt;Imr-prestege: Create a New Page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pageclass class=&amp;quot;#228B22&amp;quot; subcaption=&amp;quot;Useful Function&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt;&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
'''With this function you can create any text you want with any size color visible to who you want and this function server side only!'''&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool CreateTextItem (  player playerToAdd , time, int red = 255, int green = 255, int blue = 255, float scale = 1, string text, [ float x, float y, string alignX = &amp;quot;left&amp;quot;, string alignY = &amp;quot;top&amp;quot;] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
&lt;br /&gt;
* '''playerToAdd: The player that should observe the textdisplay.'''&lt;br /&gt;
* '''time: The number of times you want to the remove The textdisplay ,number of milliseconds (the minimum is 50)(1000 milliseconds = 1 second)'''&lt;br /&gt;
* '''red: A value between 0 and 255 indicating how red the text should be.'''&lt;br /&gt;
* '''green: A value between 0 and 255 indicating how green the text should be.'''&lt;br /&gt;
* '''blue: A value between 0 and 255 indicating how blue the text should be.'''&lt;br /&gt;
* '''scale: A floating point value indicating the scale of the text. The default is 1.0, which is around 12pt.'''&lt;br /&gt;
* '''text: A string of text you want to display'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
&lt;br /&gt;
* x: A floating point number between 0.0 and 1.0 indicating how far across the screen the text should be shown, as a percentage of the width, from the left hand side.&lt;br /&gt;
* y: A floating point number between 0.0 and 1.0 indicating how far down the screen the text should be shown, as a percentage of the height,  from the top.&lt;br /&gt;
* scale: A floating point value indicating the scale of the text. The default is 1.0, which is around 12pt.&lt;br /&gt;
* alignX: A string representing the X-alignment of the text. (&amp;quot;left&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;right&amp;quot;)&lt;br /&gt;
* alignY: A string representing the Y-alignment of the text. (&amp;quot;top&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;bottom&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
===Important Note===&lt;br /&gt;
* '''You can't use ''''getRootElement()'''' element you will get some errors you have to use getElementsByType to get All Players!'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function CreateTextItem ( player, time, r, g, b, scale, text, x, y, alignX, alignY)&lt;br /&gt;
    if not player or not time or not text then return end&lt;br /&gt;
    if not r and not g and not b then r, g, b = 255, 0, 0 end&lt;br /&gt;
    if not scale then scale = 1 end&lt;br /&gt;
    if ( isElement( player ) and type ( text ) == 'string' and tonumber( time) ) then&lt;br /&gt;
        local Display = textCreateDisplay ()&lt;br /&gt;
        local newtextItem = textCreateTextItem ( text, x or 0.5, y or 0.5, 2, r, g, b, 255, scale, alignX or &amp;quot;center&amp;quot;, alignY or &amp;quot;center&amp;quot; )&lt;br /&gt;
        textDisplayAddText ( Display, newtextItem )&lt;br /&gt;
        textDisplayAddObserver ( Display, player )&lt;br /&gt;
        setTimer(textDestroyTextItem, time, 1, newtextItem)&lt;br /&gt;
        setTimer(textDestroyDisplay, time, 1, Display)&lt;br /&gt;
    end &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server Example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This Example creates a text item. A text item represents a single area of text, much like a label !&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;Create&amp;quot;,&lt;br /&gt;
function ( element , cmd , item ) &lt;br /&gt;
    local Text = tostring ( item )&lt;br /&gt;
    if ( Text ) then&lt;br /&gt;
        CreateTextItem ( element, 5000, 255, 255, 0, 5,Text )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server Full Example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This Example creates a text item. A text item represents a single area of text, much like a label !&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function CreateTextItem ( player, time, r, g, b, scale, text, x, y, alignX, alignY)&lt;br /&gt;
	if not player or not time or not text then return end&lt;br /&gt;
	if not r and not g and not b then r, g, b = 255, 0, 0 end&lt;br /&gt;
	if not scale then scale = 1 end&lt;br /&gt;
	if ( isElement( player ) and type ( text ) == 'string' and tonumber( time) ) then&lt;br /&gt;
		local Display = textCreateDisplay ()&lt;br /&gt;
		local newtextItem = textCreateTextItem ( text, x or 0.5, y or 0.5, 2, r, g, b, 255, scale, alignX or &amp;quot;center&amp;quot;, alignY or &amp;quot;center&amp;quot; )&lt;br /&gt;
		textDisplayAddText ( Display, newtextItem )&lt;br /&gt;
		textDisplayAddObserver ( Display, player )&lt;br /&gt;
		setTimer(textDestroyTextItem, time, 1, newtextItem)&lt;br /&gt;
		setTimer(textDestroyDisplay, time, 1, Display)&lt;br /&gt;
	end	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;Test&amp;quot;,&lt;br /&gt;
function (  ) &lt;br /&gt;
		for _,v in ipairs ( getElementsByType(&amp;quot;player&amp;quot;) ) do&lt;br /&gt;
		CreateTextItem ( v, 5000, 255, 255, 0, 5,&amp;quot;Test Text&amp;quot; )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Author : '''Mr.Pres[T]ege'''. All Copy Rights Received To '''Multitheftauto''' .&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>Imr-prestege</name></author>
	</entry>
</feed>