<?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=Extrike</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=Extrike"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Extrike"/>
	<updated>2026-04-29T21:23:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiCreateCheckBox&amp;diff=23560</id>
		<title>GuiCreateCheckBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiCreateCheckBox&amp;diff=23560"/>
		<updated>2010-05-24T11:12:29Z</updated>

		<summary type="html">&lt;p&gt;Extrike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function creates a [[Element/GUI/Checkbox|checkbox]].&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element guiCreateCheckBox ( float x, float y, float width, float height, string text, bool selected, bool relative, [element parent = nil] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
[[Image:Checkbox.png|thumb|Test Checkbox]]&lt;br /&gt;
*'''x:''' A float of the 2D x position of the checkbox on a player's screen. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''y:''' A float of the 2D y position of the checkbox on a player's screen. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''width:''' A float of the width of the text field next to the checkbox. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''height:''' A float of the height of the text field next to the checkbox. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''text:''' The text to be displayed next to the checkbox.&lt;br /&gt;
*'''selected:''' A boolean representing whether the checkbox created should be selected by default.&lt;br /&gt;
*'''relative:''' This is whether sizes and positioning are relative. If this is ''true'', then all x,y,width,height floats must be between 0 and 1, representing measures relative to the parent.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''parent:''' This is the parent that the checkbox is attached to. If the ''relative'' argument is true, sizes and positioning will be made relative to this parent. If the ''relative'' argument is false, positioning will be the number of offset pixels from the parent's origin. If no parent is passed, the parent will become the screen - causing positioning and sizing according to screen positioning.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns [[element]] of the checkbox if it was created succesfully, ''false'' otherwise. &lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--This line does...&lt;br /&gt;
blabhalbalhb --abababa&lt;br /&gt;
--This line does this...&lt;br /&gt;
mooo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>Extrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Checkbox.png&amp;diff=23559</id>
		<title>File:Checkbox.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Checkbox.png&amp;diff=23559"/>
		<updated>2010-05-24T11:06:50Z</updated>

		<summary type="html">&lt;p&gt;Extrike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Extrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiCreateButton&amp;diff=23558</id>
		<title>GuiCreateButton</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiCreateButton&amp;diff=23558"/>
		<updated>2010-05-24T11:05:13Z</updated>

		<summary type="html">&lt;p&gt;Extrike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function allows creation of a GUI Button, which is a clickable item as part of GUI.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element guiCreateButton ( float x, float y, float width, float height, string text, bool relative, [ element parent = nil ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
[[Image:Button.png|thumb|GUI Test Button]]&lt;br /&gt;
*'''x:''' A float of the 2D x position of the GUI button on a player's screen.  This is affected by the ''relative'' argument.&lt;br /&gt;
*'''y:''' A float of the 2D y position of the GUI button on a player's screen. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''width:''' A float of the width of the GUI button. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''height:''' A float of the height of the GUI button. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''text:''' A string of the text that will be displayed as a label on the button.&lt;br /&gt;
*'''relative:''' This is whether sizes and positioning are relative.  If this is ''true'', then all x,y,width,height floats must be between 0 and 1, representing sizes relative to the parent.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Only include this section below if there are optional arguments --&amp;gt;&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''parent:''' This is the parent that the gui button is attached to.  If the ''relative'' argument is true, sizes and positioning will be made relative to this parent. If the ''relative'' argument is false, positioning will be the number of offset pixels from the parent's origin. If no parent is passed, the parent will become the screen - causing positioning and sizing according to screen positioning.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an element of the created button if it was successfully created, false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates an edit box alongside an &amp;quot;Output!&amp;quot; button.  When the button is clicked, it will output the message in the edit box into the Chat Box.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--create our button&lt;br /&gt;
button = guiCreateButton( 0.7, 0.1, 0.2, 0.1, &amp;quot;Output!&amp;quot;, true )&lt;br /&gt;
--Create an edit box and define it as &amp;quot;editBox&amp;quot;.&lt;br /&gt;
editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, &amp;quot;Type your message here!&amp;quot;, true )&lt;br /&gt;
-- and attach our button to the outputEditBox function&lt;br /&gt;
addEventHandler ( &amp;quot;onClientGUIClick&amp;quot;, editBox, outputEditBox )&lt;br /&gt;
guiEditSetMaxLength ( editBox, 128 ) --the max chatbox length is 128, so force this&lt;br /&gt;
&lt;br /&gt;
--setup our function to output the message to the chatbox&lt;br /&gt;
function outputEditBox ()&lt;br /&gt;
        local text = guiGetText ( editBox )--get the text from the edit box&lt;br /&gt;
        outputChatBox ( text ) --output that text&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientGUIClick&amp;quot;, button, outputEditBox )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;/div&gt;</summary>
		<author><name>Extrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiCreateButton&amp;diff=23557</id>
		<title>GuiCreateButton</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiCreateButton&amp;diff=23557"/>
		<updated>2010-05-24T11:05:00Z</updated>

		<summary type="html">&lt;p&gt;Extrike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function allows creation of a GUI Button, which is a clickable item as part of GUI.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element guiCreateButton ( float x, float y, float width, float height, string text, bool relative, [ element parent = nil ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
[[Image:Button.png|thumb|GUI Test Button]]&lt;br /&gt;
*'''x:''' A float of the 2D x position of the GUI button on a player's screen.  This is affected by the ''relative'' argument.&lt;br /&gt;
*'''y:''' A float of the 2D y position of the GUI button on a player's screen. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''width:''' A float of the width of the GUI button. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''height:''' A float of the height of the GUI button. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''text:''' A string of the text that will be displayed as a label on the button.&lt;br /&gt;
*'''relative:''' This is whether sizes and positioning are relative.  If this is ''true'', then all x,y,width,height floats must be between 0 and 1, representing sizes relative to the parent.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Only include this section below if there are optional arguments --&amp;gt;&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''parent:''' This is the parent that the gui button is attached to.  If the ''relative'' argument is true, sizes and positioning will be made relative to this parent. If the ''relative'' argument is false, positioning will be the number of offset pixels from the parent's origin. If no parent is passed, the parent will become the screen - causing positioning and sizing according to screen positioning.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an element of the created button if it was successfully created, false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
[[Image:Button.png|thumb|GUI Test Button]]&lt;br /&gt;
This example creates an edit box alongside an &amp;quot;Output!&amp;quot; button.  When the button is clicked, it will output the message in the edit box into the Chat Box.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--create our button&lt;br /&gt;
button = guiCreateButton( 0.7, 0.1, 0.2, 0.1, &amp;quot;Output!&amp;quot;, true )&lt;br /&gt;
--Create an edit box and define it as &amp;quot;editBox&amp;quot;.&lt;br /&gt;
editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, &amp;quot;Type your message here!&amp;quot;, true )&lt;br /&gt;
-- and attach our button to the outputEditBox function&lt;br /&gt;
addEventHandler ( &amp;quot;onClientGUIClick&amp;quot;, editBox, outputEditBox )&lt;br /&gt;
guiEditSetMaxLength ( editBox, 128 ) --the max chatbox length is 128, so force this&lt;br /&gt;
&lt;br /&gt;
--setup our function to output the message to the chatbox&lt;br /&gt;
function outputEditBox ()&lt;br /&gt;
        local text = guiGetText ( editBox )--get the text from the edit box&lt;br /&gt;
        outputChatBox ( text ) --output that text&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientGUIClick&amp;quot;, button, outputEditBox )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;/div&gt;</summary>
		<author><name>Extrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiCreateButton&amp;diff=23556</id>
		<title>GuiCreateButton</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiCreateButton&amp;diff=23556"/>
		<updated>2010-05-24T11:04:15Z</updated>

		<summary type="html">&lt;p&gt;Extrike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function allows creation of a GUI Button, which is a clickable item as part of GUI.&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;
element guiCreateButton ( float x, float y, float width, float height, string text, bool relative, [ element parent = nil ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''x:''' A float of the 2D x position of the GUI button on a player's screen.  This is affected by the ''relative'' argument.&lt;br /&gt;
*'''y:''' A float of the 2D y position of the GUI button on a player's screen. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''width:''' A float of the width of the GUI button. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''height:''' A float of the height of the GUI button. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''text:''' A string of the text that will be displayed as a label on the button.&lt;br /&gt;
*'''relative:''' This is whether sizes and positioning are relative.  If this is ''true'', then all x,y,width,height floats must be between 0 and 1, representing sizes relative to the parent.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Only include this section below if there are optional arguments --&amp;gt;&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''parent:''' This is the parent that the gui button is attached to.  If the ''relative'' argument is true, sizes and positioning will be made relative to this parent. If the ''relative'' argument is false, positioning will be the number of offset pixels from the parent's origin. If no parent is passed, the parent will become the screen - causing positioning and sizing according to screen positioning.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an element of the created button if it was successfully created, false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
[[Image:Button.png|thumb|GUI Test Button]]&lt;br /&gt;
This example creates an edit box alongside an &amp;quot;Output!&amp;quot; button.  When the button is clicked, it will output the message in the edit box into the Chat Box.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--create our button&lt;br /&gt;
button = guiCreateButton( 0.7, 0.1, 0.2, 0.1, &amp;quot;Output!&amp;quot;, true )&lt;br /&gt;
--Create an edit box and define it as &amp;quot;editBox&amp;quot;.&lt;br /&gt;
editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, &amp;quot;Type your message here!&amp;quot;, true )&lt;br /&gt;
-- and attach our button to the outputEditBox function&lt;br /&gt;
addEventHandler ( &amp;quot;onClientGUIClick&amp;quot;, editBox, outputEditBox )&lt;br /&gt;
guiEditSetMaxLength ( editBox, 128 ) --the max chatbox length is 128, so force this&lt;br /&gt;
&lt;br /&gt;
--setup our function to output the message to the chatbox&lt;br /&gt;
function outputEditBox ()&lt;br /&gt;
        local text = guiGetText ( editBox )--get the text from the edit box&lt;br /&gt;
        outputChatBox ( text ) --output that text&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientGUIClick&amp;quot;, button, outputEditBox )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;/div&gt;</summary>
		<author><name>Extrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiCreateButton&amp;diff=23555</id>
		<title>GuiCreateButton</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiCreateButton&amp;diff=23555"/>
		<updated>2010-05-24T11:04:00Z</updated>

		<summary type="html">&lt;p&gt;Extrike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Button.png|thumb|GUI Test Button]]&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function allows creation of a GUI Button, which is a clickable item as part of GUI.&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;
element guiCreateButton ( float x, float y, float width, float height, string text, bool relative, [ element parent = nil ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''x:''' A float of the 2D x position of the GUI button on a player's screen.  This is affected by the ''relative'' argument.&lt;br /&gt;
*'''y:''' A float of the 2D y position of the GUI button on a player's screen. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''width:''' A float of the width of the GUI button. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''height:''' A float of the height of the GUI button. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''text:''' A string of the text that will be displayed as a label on the button.&lt;br /&gt;
*'''relative:''' This is whether sizes and positioning are relative.  If this is ''true'', then all x,y,width,height floats must be between 0 and 1, representing sizes relative to the parent.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Only include this section below if there are optional arguments --&amp;gt;&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''parent:''' This is the parent that the gui button is attached to.  If the ''relative'' argument is true, sizes and positioning will be made relative to this parent. If the ''relative'' argument is false, positioning will be the number of offset pixels from the parent's origin. If no parent is passed, the parent will become the screen - causing positioning and sizing according to screen positioning.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an element of the created button if it was successfully created, false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates an edit box alongside an &amp;quot;Output!&amp;quot; button.  When the button is clicked, it will output the message in the edit box into the Chat Box.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--create our button&lt;br /&gt;
button = guiCreateButton( 0.7, 0.1, 0.2, 0.1, &amp;quot;Output!&amp;quot;, true )&lt;br /&gt;
--Create an edit box and define it as &amp;quot;editBox&amp;quot;.&lt;br /&gt;
editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, &amp;quot;Type your message here!&amp;quot;, true )&lt;br /&gt;
-- and attach our button to the outputEditBox function&lt;br /&gt;
addEventHandler ( &amp;quot;onClientGUIClick&amp;quot;, editBox, outputEditBox )&lt;br /&gt;
guiEditSetMaxLength ( editBox, 128 ) --the max chatbox length is 128, so force this&lt;br /&gt;
&lt;br /&gt;
--setup our function to output the message to the chatbox&lt;br /&gt;
function outputEditBox ()&lt;br /&gt;
        local text = guiGetText ( editBox )--get the text from the edit box&lt;br /&gt;
        outputChatBox ( text ) --output that text&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientGUIClick&amp;quot;, button, outputEditBox )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;/div&gt;</summary>
		<author><name>Extrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiCreateButton&amp;diff=23554</id>
		<title>GuiCreateButton</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiCreateButton&amp;diff=23554"/>
		<updated>2010-05-24T11:03:39Z</updated>

		<summary type="html">&lt;p&gt;Extrike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function allows creation of a GUI Button, which is a clickable item as part of GUI.&lt;br /&gt;
&lt;br /&gt;
[[Image:Button.png|thumb|GUI Test Button]]&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element guiCreateButton ( float x, float y, float width, float height, string text, bool relative, [ element parent = nil ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''x:''' A float of the 2D x position of the GUI button on a player's screen.  This is affected by the ''relative'' argument.&lt;br /&gt;
*'''y:''' A float of the 2D y position of the GUI button on a player's screen. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''width:''' A float of the width of the GUI button. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''height:''' A float of the height of the GUI button. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''text:''' A string of the text that will be displayed as a label on the button.&lt;br /&gt;
*'''relative:''' This is whether sizes and positioning are relative.  If this is ''true'', then all x,y,width,height floats must be between 0 and 1, representing sizes relative to the parent.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Only include this section below if there are optional arguments --&amp;gt;&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''parent:''' This is the parent that the gui button is attached to.  If the ''relative'' argument is true, sizes and positioning will be made relative to this parent. If the ''relative'' argument is false, positioning will be the number of offset pixels from the parent's origin. If no parent is passed, the parent will become the screen - causing positioning and sizing according to screen positioning.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an element of the created button if it was successfully created, false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates an edit box alongside an &amp;quot;Output!&amp;quot; button.  When the button is clicked, it will output the message in the edit box into the Chat Box.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--create our button&lt;br /&gt;
button = guiCreateButton( 0.7, 0.1, 0.2, 0.1, &amp;quot;Output!&amp;quot;, true )&lt;br /&gt;
--Create an edit box and define it as &amp;quot;editBox&amp;quot;.&lt;br /&gt;
editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, &amp;quot;Type your message here!&amp;quot;, true )&lt;br /&gt;
-- and attach our button to the outputEditBox function&lt;br /&gt;
addEventHandler ( &amp;quot;onClientGUIClick&amp;quot;, editBox, outputEditBox )&lt;br /&gt;
guiEditSetMaxLength ( editBox, 128 ) --the max chatbox length is 128, so force this&lt;br /&gt;
&lt;br /&gt;
--setup our function to output the message to the chatbox&lt;br /&gt;
function outputEditBox ()&lt;br /&gt;
        local text = guiGetText ( editBox )--get the text from the edit box&lt;br /&gt;
        outputChatBox ( text ) --output that text&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientGUIClick&amp;quot;, button, outputEditBox )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;/div&gt;</summary>
		<author><name>Extrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Button.png&amp;diff=23553</id>
		<title>File:Button.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Button.png&amp;diff=23553"/>
		<updated>2010-05-24T11:03:19Z</updated>

		<summary type="html">&lt;p&gt;Extrike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Extrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsMTAWindowActive&amp;diff=23552</id>
		<title>IsMTAWindowActive</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsMTAWindowActive&amp;diff=23552"/>
		<updated>2010-05-24T10:29:27Z</updated>

		<summary type="html">&lt;p&gt;Extrike: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function returns whether the any system windows that take focus are active. This includes the chatbox input, console window, main menu and transferbox.&lt;br /&gt;
To get the status of the debug view, see [[isDebugViewActive]].&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 isMTAWindowActive ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the focus is on the MTA window, ''false'' if isn't.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function kill a player if it comes out in the standard menu MTA&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function(thePlayer)&lt;br /&gt;
	if isMTAWindowActive()	then&lt;br /&gt;
		 setElementHealth ( thePlayer, 0.0 )&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;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;/div&gt;</summary>
		<author><name>Extrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsMTAWindowActive&amp;diff=23551</id>
		<title>IsMTAWindowActive</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsMTAWindowActive&amp;diff=23551"/>
		<updated>2010-05-24T10:29:06Z</updated>

		<summary type="html">&lt;p&gt;Extrike: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function returns whether the any system windows that take focus are active. This includes the chatbox input, console window, main menu and transferbox.&lt;br /&gt;
To get the status of the debug view, see [[isDebugViewActive]].&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 isMTAWindowActive ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the focus is on the MTA window, ''false'' if isn't.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function kill a player if it comes out in the standard menu MTA&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function(thePlayer)&lt;br /&gt;
	if isMTAWindowActive()	then&lt;br /&gt;
		 setElementHealth ( thePlayer, 0.0 )&lt;br /&gt;
	end	 &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>Extrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetElementRadius&amp;diff=23550</id>
		<title>GetElementRadius</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetElementRadius&amp;diff=23550"/>
		<updated>2010-05-24T10:23:25Z</updated>

		<summary type="html">&lt;p&gt;Extrike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function gets the radius from a element.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This could really do with saying what elements it affects, and what you'd expect to get back from them --&amp;gt;&lt;br /&gt;
[[Category:Incomplete]] &amp;lt;!-- Do not remove unless you finish the documentation. --&amp;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;
float getElementRadius ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The element.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''float'' as radius, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Example of how to derive the radius of a player:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function myCommandHandler(source, command)&lt;br /&gt;
	local myradius = getElementRadius ( source )&lt;br /&gt;
	if (myradius) then&lt;br /&gt;
		outputChatBox(&amp;quot;Radius of my player is: &amp;quot; .. myradius)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Error&amp;quot;)&lt;br /&gt;
	end	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;getmyradius&amp;quot;, myCommandHandler)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client element functions}}&lt;/div&gt;</summary>
		<author><name>Extrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetElementRadius&amp;diff=23549</id>
		<title>GetElementRadius</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetElementRadius&amp;diff=23549"/>
		<updated>2010-05-24T10:22:31Z</updated>

		<summary type="html">&lt;p&gt;Extrike: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function gets the radius from a element.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This could really do with saying what elements it affects, and what you'd expect to get back from them --&amp;gt;&lt;br /&gt;
[[Category:Incomplete]] &amp;lt;!-- Do not remove unless you finish the documentation. --&amp;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;
float getElementRadius ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The element.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''float'' as radius, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Example of how to derive the radius of a player:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function myCommandHandler(source, command)&lt;br /&gt;
	local myradius = getElementRadius ( source )&lt;br /&gt;
	if (myradius) then&lt;br /&gt;
		outputChatBox(&amp;quot;Radius of my player is: &amp;quot; .. myradius)&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox(&amp;quot;Error&amp;quot;)&lt;br /&gt;
	end	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;getmyradius&amp;quot;, myCommandHandler)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client element functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>Extrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SpawnVehicle&amp;diff=23548</id>
		<title>SpawnVehicle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SpawnVehicle&amp;diff=23548"/>
		<updated>2010-05-24T10:17:19Z</updated>

		<summary type="html">&lt;p&gt;Extrike: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Spawns a vehicle at any given position and rotation&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 spawnVehicle ( vehicle theVehicle, float x, float y, float z [, float rx, float ry, float rz ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The vehicle you wish to spawn&lt;br /&gt;
*'''x:''' The x position you wish to spawn the vehicle at&lt;br /&gt;
*'''y:''' The x position you wish to spawn the vehicle at&lt;br /&gt;
*'''z:''' The x position you wish to spawn the vehicle at&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''rx:''' The x rotation you wish to spawn the vehicle at&lt;br /&gt;
*'''ry:''' The y rotation you wish to spawn the vehicle at&lt;br /&gt;
*'''rz:''' The z rotation you wish to spawn the vehicle at&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the vehicle spawned successfully, ''false'' if the passed argument does not exist or is not a vehicle.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
With this feature, we spawn vehicle&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local x, y, z = getElementPosition(source)&lt;br /&gt;
&lt;br /&gt;
function myCommandHandler(source, command)&lt;br /&gt;
	local RaceVehicle = createVehicle ( 411, 0, 0, 0 ) &lt;br /&gt;
	local spawnVeh = spawnVehicle ( RaceVehicle, x+3, y+3, z )	end&lt;br /&gt;
	if spawnVeh	then	outputChatBox(&amp;quot;Vehicle was spawned&amp;quot;, source)	else	outputChatBox(&amp;quot;Error&amp;quot;,source)	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;spawnvehicle&amp;quot;, myCommandHandler)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Related scripting functions==&lt;br /&gt;
{{Vehicle functions}}&lt;br /&gt;
[[Category:Element Types]]&lt;/div&gt;</summary>
		<author><name>Extrike</name></author>
	</entry>
</feed>