<?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=OpenIDUser52</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=OpenIDUser52"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/OpenIDUser52"/>
	<updated>2026-06-21T09:49:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:DxDraw3DText&amp;diff=36726</id>
		<title>Resource:DxDraw3DText</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:DxDraw3DText&amp;diff=36726"/>
		<updated>2013-07-22T14:05:34Z</updated>

		<summary type="html">&lt;p&gt;OpenIDUser52: Created page with &amp;quot;{{Resource page}}  This resource allowe you to draw 3D-DX texts any where in the game .   ==How it works== You only need to use the exported function from the resource '''dxDraw3...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
&lt;br /&gt;
This resource allowe you to draw 3D-DX texts any where in the game .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How it works==&lt;br /&gt;
You only need to use the exported function from the resource '''dxDraw3DText''' and draw the text . ( To use the exported function use [[call]] function ) .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The dxDraw3DText function==&lt;br /&gt;
&lt;br /&gt;
===Syntax===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;element dxDraw3DText( string text, int x, int y, int z [, int scale = 2, string font = &amp;quot;default&amp;quot;, int r = 255, int g = 255, int b = 255, int maxDistance = 12 ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''text :''' A [[string]] representing the text you wish to draw .&lt;br /&gt;
*'''x, y, z :''' Three integers representing the world coordinates of where you want the text to be .&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''scale :''' An [[int]] representing the size of the font .&lt;br /&gt;
*'''font :''' A [[string]] representing the font type, This CAN'T be a [[DX font]] element, It can ONLY be :&lt;br /&gt;
{{DxFonts}}&lt;br /&gt;
*'''r, g, b :''' Three integers representing the RGB Color codes for the text .&lt;br /&gt;
*''' maxDistance :''' An [[int]] representing the max distance the text will show in .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&lt;br /&gt;
The function returns a ''text element'' if successfule, ''false'' otherwise .&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
&lt;br /&gt;
This example will draw a 3D text neer a player when the resource starts, And destroys it after 5 secinds .&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;local dxDraw3DText = exports.3D_DX_Texts:dxDraw3DText -- define the function&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, getResourceRootElement( getThisResource( ) ),&lt;br /&gt;
	function( )&lt;br /&gt;
		local x, y, z = getElementPosition( getLocalPlayer( ) ) -- getting the player coordinates&lt;br /&gt;
		local playerName = getPlayerName( getLocalPlayer( ) ) -- getting the player name&lt;br /&gt;
		local theText = dxDraw3DText( &amp;quot;Welcome &amp;quot; .. playerName, x, y, z ) -- dtawing the text&lt;br /&gt;
		if theText then -- if it was drawn&lt;br /&gt;
			setTimer( destroyElement, 5000, 1, theText ) -- set a time to destroy it after 5 seconds&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
* The ''dxDraw3DText'' function is client side only .&lt;br /&gt;
* The ''dxDraw3DText'' function doesn't need the [[onClientRender]] event to work .&lt;br /&gt;
* The ''dxDraw3DText'' function only creates a ''text element'', The drawing and stuff is done in the resource, So it MUST be running so the texts show .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Download==&lt;br /&gt;
You can download the resource, comment about it, rate it and report any bugs at the community page : [https://community.multitheftauto.com/index.php?p=resources&amp;amp;s=details&amp;amp;id=7613]&lt;/div&gt;</summary>
		<author><name>OpenIDUser52</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiGridListGetSelectedItemText&amp;diff=35177</id>
		<title>GuiGridListGetSelectedItemText</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiGridListGetSelectedItemText&amp;diff=35177"/>
		<updated>2013-03-18T13:48:25Z</updated>

		<summary type="html">&lt;p&gt;OpenIDUser52: Created page with &amp;quot;__NOTOC__  {{Useful Function}} This function gets the item text of the selected item in a grid list .  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; string guiGridListGetSelectedItemText ( element gr...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function gets the item text of the selected item in a grid list .&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string guiGridListGetSelectedItemText ( element gridList [, int column] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments==&lt;br /&gt;
* '''gridList :'''  The gridLsit to get the selected item text from .&lt;br /&gt;
&lt;br /&gt;
==Optional Arguments==&lt;br /&gt;
* '''column :''' The column to get the selected item text from .&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name='Client' class='client' show='true'&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function guiGridListGetSelectedItemText ( gridList, column )&lt;br /&gt;
    local falseText = ''&lt;br /&gt;
    local item = guiGridListGetSelectedItem ( gridList )&lt;br /&gt;
    local text = guiGridListGetItemText ( gridList, item, column or 1 )&lt;br /&gt;
    if ( text ~= '' ) then&lt;br /&gt;
        return text&lt;br /&gt;
    else&lt;br /&gt;
        return false&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;
&lt;br /&gt;
==Returns==&lt;br /&gt;
&lt;br /&gt;
* A ''String'' containing the selected item text, ''false'' otherwise .&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
* This example gets a player name from the grid list, and out puts it in the chat .&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local window = guiCreateWindow ( 350, 100, 200, 250, &amp;quot;The Players&amp;quot;, false )&lt;br /&gt;
--- Create a window !&lt;br /&gt;
local gridList = guiCreateGridList ( 0.8, 0.1, 0.15, 0.6, true, window )&lt;br /&gt;
--- Create a grid list in the window !&lt;br /&gt;
local players = getElementsByType( 'player' )&lt;br /&gt;
--- Create a table containing all the players !&lt;br /&gt;
&lt;br /&gt;
for i,player in ipairs ( players ) do&lt;br /&gt;
--- Loop the table !&lt;br /&gt;
local row = guiGridListAddRow ( gridList )&lt;br /&gt;
--- Add a row to the grid list !&lt;br /&gt;
guiGridListSetItemText ( gridLsit, row, 1, getPlayerName ( player ), false, false )&lt;br /&gt;
--- Set the row's text to the players names !&lt;br /&gt;
&lt;br /&gt;
function selectAPlayer ( )&lt;br /&gt;
--- Start a function !&lt;br /&gt;
    if ( guiGridListGetSelectedItem ( gridList ) ) then&lt;br /&gt;
--- If there was a selected item in the grid list !&lt;br /&gt;
        local thePlayerName = guiGridListGetSelectedItemText ( gridList )&lt;br /&gt;
--- Get the selected item text !&lt;br /&gt;
        outputChatBox ( thePlayerName..' is a player in the server!' )&lt;br /&gt;
--- Out put his name in the chat !&lt;br /&gt;
    end &lt;br /&gt;
--- Close the ' if ' !&lt;br /&gt;
end&lt;br /&gt;
--- Close the ' function ' !&lt;br /&gt;
addEventHandler ( 'onClientDoubleGUIClick', root, selectAPlayer )&lt;br /&gt;
--- Add the event handler of the function !&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Author : ''' #Pai_[N]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>OpenIDUser52</name></author>
	</entry>
</feed>