<?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=Manuelhimmler</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=Manuelhimmler"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Manuelhimmler"/>
	<updated>2026-05-14T07:23:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPlayerSerial&amp;diff=22084</id>
		<title>GetPlayerSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPlayerSerial&amp;diff=22084"/>
		<updated>2009-12-25T15:48:21Z</updated>

		<summary type="html">&lt;p&gt;Manuelhimmler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function returns the [[serial]] for a specified [[player]].&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 getPlayerSerial ( player thePlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePlayer:''' A [[player]] object referencing the specified player.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns the serial as a ''string'' if it was found, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
The format of the serial has been changed.&lt;br /&gt;
}}&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;
This example creates a command with which player can check their own serial.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function checkMySerial( thePlayer, command )&lt;br /&gt;
    local theSerial = getPlayerSerial( thePlayer )&lt;br /&gt;
    if theSerial then&lt;br /&gt;
        outputChatBox( &amp;quot;Your serial is: &amp;quot; .. theSerial, thePlayer )&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox( &amp;quot;Sorry, you have no serial. =(&amp;quot;, thePlayer )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;serial&amp;quot;, checkMySerial )&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;
{{Serial functions}}&lt;/div&gt;</summary>
		<author><name>Manuelhimmler</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPlayerSerial&amp;diff=22083</id>
		<title>GetPlayerSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPlayerSerial&amp;diff=22083"/>
		<updated>2009-12-25T15:48:04Z</updated>

		<summary type="html">&lt;p&gt;Manuelhimmler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function returns the [[serial]] for a specified [[player]].&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 getPlayerSerial ( player thePlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePlayer:''' A [[player]] object referencing the specified player.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns the serial as a ''string'' if it was found, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
The format of the serial has been changed.&lt;br /&gt;
}}&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;
This example creates a command with which player can check their own serial.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function checkMySerial( thePlayer, command )&lt;br /&gt;
    local theSerial = getPlayerSerial( thePlayer )&lt;br /&gt;
    if theSerial then&lt;br /&gt;
        outputChatBox( &amp;quot;Your serial is: &amp;quot; .. theSerial, thePlayer )&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox( &amp;quot;Sorry, you have no serial. =(&amp;quot;, thePlayer )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;serial&amp;quot;, checkMySerial )&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;
{{Serial functions}}&lt;/div&gt;</summary>
		<author><name>Manuelhimmler</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiCreateButton&amp;diff=22081</id>
		<title>GuiCreateButton</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiCreateButton&amp;diff=22081"/>
		<updated>2009-12-24T01:06:43Z</updated>

		<summary type="html">&lt;p&gt;Manuelhimmler: /* Example */&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;
*'''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>Manuelhimmler</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=KickPlayer&amp;diff=22067</id>
		<title>KickPlayer</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=KickPlayer&amp;diff=22067"/>
		<updated>2009-12-20T11:18:46Z</updated>

		<summary type="html">&lt;p&gt;Manuelhimmler: /* Optional Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function will kick the specified player from the server.&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 kickPlayer ( player kickedPlayer [[, player responsiblePlayer = nil], string reason = &amp;quot;&amp;quot; ] )         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''kickedPlayer:''' The player that will be kicked from the server&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''responsiblePlayer:''' The player that is responsible for the event (if nil leave this argument out!)&lt;br /&gt;
*'''reason:''' The reason for the kick. This argument can also be used as the 2nd argument, in this case responsible player for the kick will be &amp;quot;Console&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the player was kicked succesfully, ''false'' if invalid arguments are specified.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example lets a player kick anyone who has a lower level.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function kickPlayerHandler ( sourcePlayer, commandname, kickedname, reason )&lt;br /&gt;
	-- Get player element from the name&lt;br /&gt;
	local kicked = getPlayerFromNick ( kickedname )&lt;br /&gt;
	-- If the client who sent the command has a higher level&lt;br /&gt;
	if ( hasObjectPermissionTo ( sourcePlayer, &amp;quot;function.kickPlayer&amp;quot; ) ) then&lt;br /&gt;
		-- Kick the player&lt;br /&gt;
		kickPlayer ( kicked, sourcePlayer, reason )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
-- Add the &amp;quot;kick&amp;quot; command handler&lt;br /&gt;
addCommandHandler ( &amp;quot;kick&amp;quot;, kickPlayerHandler )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Admin_functions}}&lt;br /&gt;
[[ru:kickPlayer]]&lt;/div&gt;</summary>
		<author><name>Manuelhimmler</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=KickPlayer&amp;diff=22066</id>
		<title>KickPlayer</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=KickPlayer&amp;diff=22066"/>
		<updated>2009-12-20T11:18:02Z</updated>

		<summary type="html">&lt;p&gt;Manuelhimmler: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function will kick the specified player from the server.&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 kickPlayer ( player kickedPlayer [[, player responsiblePlayer = nil], string reason = &amp;quot;&amp;quot; ] )         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''kickedPlayer:''' The player that will be kicked from the server&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''responsiblePlayer:''' The player that is responsible for the event&lt;br /&gt;
*'''reason:''' The reason for the kick. This argument can also be used as the 2nd argument, in this case responsible player for the kick will be &amp;quot;Console&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the player was kicked succesfully, ''false'' if invalid arguments are specified.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example lets a player kick anyone who has a lower level.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function kickPlayerHandler ( sourcePlayer, commandname, kickedname, reason )&lt;br /&gt;
	-- Get player element from the name&lt;br /&gt;
	local kicked = getPlayerFromNick ( kickedname )&lt;br /&gt;
	-- If the client who sent the command has a higher level&lt;br /&gt;
	if ( hasObjectPermissionTo ( sourcePlayer, &amp;quot;function.kickPlayer&amp;quot; ) ) then&lt;br /&gt;
		-- Kick the player&lt;br /&gt;
		kickPlayer ( kicked, sourcePlayer, reason )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
-- Add the &amp;quot;kick&amp;quot; command handler&lt;br /&gt;
addCommandHandler ( &amp;quot;kick&amp;quot;, kickPlayerHandler )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Admin_functions}}&lt;br /&gt;
[[ru:kickPlayer]]&lt;/div&gt;</summary>
		<author><name>Manuelhimmler</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=KickPlayer&amp;diff=22065</id>
		<title>KickPlayer</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=KickPlayer&amp;diff=22065"/>
		<updated>2009-12-20T11:17:15Z</updated>

		<summary type="html">&lt;p&gt;Manuelhimmler: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
{{Needs_Checking|Currently, to use with a reason but without a responsible player, the function has to be called: kickPlayer( kickedPlayer, reason )}} &lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function will kick the specified player from the server.&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 kickPlayer ( player kickedPlayer [[, player responsiblePlayer = nil], string reason = &amp;quot;&amp;quot; ] )         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''kickedPlayer:''' The player that will be kicked from the server&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''responsiblePlayer:''' The player that is responsible for the event&lt;br /&gt;
*'''reason:''' The reason for the kick. This argument can also be used as the 2nd argument, in this case responsible player for the kick will be &amp;quot;Console&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the player was kicked succesfully, ''false'' if invalid arguments are specified.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example lets a player kick anyone who has a lower level.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function kickPlayerHandler ( sourcePlayer, commandname, kickedname, reason )&lt;br /&gt;
	-- Get player element from the name&lt;br /&gt;
	local kicked = getPlayerFromNick ( kickedname )&lt;br /&gt;
	-- If the client who sent the command has a higher level&lt;br /&gt;
	if ( hasObjectPermissionTo ( sourcePlayer, &amp;quot;function.kickPlayer&amp;quot; ) ) then&lt;br /&gt;
		-- Kick the player&lt;br /&gt;
		kickPlayer ( kicked, sourcePlayer, reason )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
-- Add the &amp;quot;kick&amp;quot; command handler&lt;br /&gt;
addCommandHandler ( &amp;quot;kick&amp;quot;, kickPlayerHandler )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Admin_functions}}&lt;br /&gt;
[[ru:kickPlayer]]&lt;/div&gt;</summary>
		<author><name>Manuelhimmler</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ToggleAllControls&amp;diff=21976</id>
		<title>ToggleAllControls</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ToggleAllControls&amp;diff=21976"/>
		<updated>2009-11-26T18:50:06Z</updated>

		<summary type="html">&lt;p&gt;Manuelhimmler: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
Enables or disables the use of all GTA controls for a specified player.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool toggleAllControls ( player thePlayer, bool enabled, [bool gtaControls=true, bool mtaControls=true] ) &amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' The player you wish to toggle the control ability of.&lt;br /&gt;
*'''enabled:''' A boolean value representing whether or not the controls will be usable.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguemnts===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
*'''gtaControls:''' A boolean deciding whether the ''enabled'' parameter will affect GTA's internal controls.&lt;br /&gt;
*'''mtaControls:''' A boolean deciding whether the ''enabled'' parameter will affect MTA's own controls., e.g. chatbox.&lt;br /&gt;
&amp;lt;/section&amp;gt;&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool toggleAllControls ( bool enabled, [bool gtaControls=true, bool mtaControls=true] ) &amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''enabled:''' A boolean value representing whether or not the controls will be usable or not.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguemnts===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
*'''gtaControls:''' A boolean deciding whether the ''enabled'' parameter will affect GTA's internal controls.&lt;br /&gt;
*'''mtaControls:''' A boolean deciding whether the ''enabled'' parameter will affect MTA's own controls., e.g. chatbox.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns ''true'' if controls were toggled successfully, false otherwise.&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;
This function will disable the use of all controls in order to freeze a player, which will be used every time someone enters a vehicle.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function freezeThisDude ( thePlayer, freezeTime )&lt;br /&gt;
    toggleAllControls ( thePlayer, false )                         -- disable this player's controls&lt;br /&gt;
    setTimer ( toggleAllControls, freezeTime, 1, thePlayer, true ) -- enable this player's controls after the specified time&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function freezeOnEnterVehicle ( theVehicle, seat, jacked )&lt;br /&gt;
    freezeThisDude ( source, 5000 ) -- 'freeze' him for 5000ms = 5 seconds&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerVehicleEnter&amp;quot;, getRootElement(), freezeOnEnterVehicle )&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;
{{Input functions}}&lt;/div&gt;</summary>
		<author><name>Manuelhimmler</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetDistanceBetweenPoints3D&amp;diff=21940</id>
		<title>GetDistanceBetweenPoints3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetDistanceBetweenPoints3D&amp;diff=21940"/>
		<updated>2009-11-14T21:21:28Z</updated>

		<summary type="html">&lt;p&gt;Manuelhimmler: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns the distance between two 3 dimensional points using the pythagorean theorem.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server and client&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;float getDistanceBetweenPoints3D ( float x1, float y1, float z1, float x2, float y2, float z2 )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''x1''': The X position of the first point&lt;br /&gt;
* '''y1''': The Y position of the first point&lt;br /&gt;
* '''z1''': The Z position of the first point&lt;br /&gt;
* '''x2''': The X position of the second point&lt;br /&gt;
* '''y2''': The Y position of the second point&lt;br /&gt;
* '''z2''': The Z position of the second point&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a float containing the distance between the two points as a [[float]]. Returns ''false'' if an argument passed was invalid.&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 and client&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example gets the distance between two vehicles and outputs it to the chat box.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
vehicle1x, vehicle1y, vehicle1z = getElementPosition ( vehicle1 )&lt;br /&gt;
vehicle2x, vehicle2y, vehicle2z = getElementPosition ( vehicle2 )&lt;br /&gt;
outputChatBox ( &amp;quot;The distance between vehicle1 and vehicle2 is &amp;quot;..tostring(getDistanceBetweenPoints3D ( vehicle1x, vehicle1y, vehicle1z, vehicle2x,&lt;br /&gt;
 vehicle2y, vehicle2z )) )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility functions}}&lt;/div&gt;</summary>
		<author><name>Manuelhimmler</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetDistanceBetweenPoints3D&amp;diff=21939</id>
		<title>GetDistanceBetweenPoints3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetDistanceBetweenPoints3D&amp;diff=21939"/>
		<updated>2009-11-14T21:21:00Z</updated>

		<summary type="html">&lt;p&gt;Manuelhimmler: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns the distance between two 3 dimensional points using the pythagorean theorem.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server and client&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;float getDistanceBetweenPoints3D ( float x1, float y1, float z1, float x2, float y2, float z2 )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''x1''': The X position of the first point&lt;br /&gt;
* '''y1''': The Y position of the first point&lt;br /&gt;
* '''z1''': The Z position of the first point&lt;br /&gt;
* '''x2''': The X position of the second point&lt;br /&gt;
* '''y2''': The Y position of the second point&lt;br /&gt;
* '''z2''': The Z position of the second point&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a float containing the distance between the two points as a [[float]]. Returns ''false'' if an argument passed was invalid.&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 and client&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example gets the distance between two vehicles and outputs it to the chat box.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
vehicle1x, vehicle1y, vehicle1z = getElementPosition ( vehicle1 )&lt;br /&gt;
vehicle2x, vehicle2y, vehicle2z = getElementPosition ( vehicle2 )&lt;br /&gt;
outputChatBox ( &amp;quot;The distance between vehicle1 and vehicle2 is &amp;quot;..tostring(getDistanceBetweenPoints3D ( vehicle1x, vehicle1y, vehicle1z, vehicle2x, vehicle2y, vehicle2z )) )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility functions}}&lt;/div&gt;</summary>
		<author><name>Manuelhimmler</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineReplaceModel&amp;diff=21935</id>
		<title>EngineReplaceModel</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineReplaceModel&amp;diff=21935"/>
		<updated>2009-11-14T15:14:01Z</updated>

		<summary type="html">&lt;p&gt;Manuelhimmler: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function replaces the given model in the given model ID with the DFF file passed. This function supports vehicles and objects at the moment.&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 engineReplaceModel ( dff theModel, int modelID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theModel:''' The model to replace the given model ID with&lt;br /&gt;
*'''modelID:''' The model it to replace the model of&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the model was successfully replaced, ''false'' if it failed for some reason, ie. the DFF or the model ID is not valid.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
'''Example 1:'''&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;
Client-Side example for replacing vehicle model and texture with custom ones.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function ReplaceVehicle ( )&lt;br /&gt;
outputChatBox ( &amp;quot;&amp;gt; replacing the euros vehicle&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
txd = engineLoadTXD ( &amp;quot;data/euros.txd&amp;quot; )&lt;br /&gt;
engineImportTXD ( txd, 587 )&lt;br /&gt;
dff = engineLoadDFF ( &amp;quot;data/euros.dff&amp;quot;, 587 )&lt;br /&gt;
engineReplaceModel ( dff, 587 )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEvent ( &amp;quot;replaceVeh&amp;quot;, true )&lt;br /&gt;
addEventHandler ( &amp;quot;replaceVeh&amp;quot;, getRootElement(), ReplaceVehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&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;
Server-side example function for triggering the replace.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function ReplaceCommand ( )&lt;br /&gt;
triggerClientEvent( &amp;quot;replaceVeh&amp;quot;, getRootElement(), replaceVeh )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;replace&amp;quot;, ReplaceCommand )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 2:'''&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;
Client-Side example for replacing object model, collision and texture with custom ones.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function ReplaceObject ( )&lt;br /&gt;
&lt;br /&gt;
txd = engineLoadTXD( &amp;quot;MyModel.txd&amp;quot; )&lt;br /&gt;
col = engineLoadCOL( &amp;quot;MyModel.col&amp;quot; )&lt;br /&gt;
dff = engineLoadDFF( &amp;quot;MyModel.dff&amp;quot;, 0 ) --modelid is everytime 0, when you replace no vehicle&lt;br /&gt;
&lt;br /&gt;
engineImportTXD( txd, 1234 )&lt;br /&gt;
engineReplaceCOL( col, 1234 )&lt;br /&gt;
engineReplaceModel( dff, 1234 )-- replace the model at least&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEvent ( &amp;quot;replaceObj&amp;quot;, true )&lt;br /&gt;
addEventHandler ( &amp;quot;replaceObj&amp;quot;, getRootElement(), ReplaceObject )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&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;
Server-side example function for triggering the replace.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function ReplaceCommand ( )&lt;br /&gt;
triggerClientEvent( &amp;quot;replaceObj&amp;quot;, getRootElement(), replaceObj )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;replace&amp;quot;, ReplaceCommand )&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;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>Manuelhimmler</name></author>
	</entry>
</feed>