<?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=Rafael+Schiedel</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=Rafael+Schiedel"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Rafael_Schiedel"/>
	<updated>2026-04-27T23:12:44Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetAccounts&amp;diff=26114</id>
		<title>GetAccounts</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetAccounts&amp;diff=26114"/>
		<updated>2011-06-21T12:27:52Z</updated>

		<summary type="html">&lt;p&gt;Rafael Schiedel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function returns a table over all the accounts that exist in the server internal.db file. (Note: accounts.xml is no longer used after version 1.0.4)&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table getAccounts ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
A [[table]] over the accounts that exist in the server internal.db file. This table might be empty.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function printAmountOfAccounts ( thePlayer )&lt;br /&gt;
    local accountTable = getAccounts () -- return the table over accounts&lt;br /&gt;
    if #accountTable == 0 then -- if the table is empty&lt;br /&gt;
        outputChatBox( &amp;quot;There are no accounts. :(&amp;quot;, thePlayer )&lt;br /&gt;
    else -- table isn't empty&lt;br /&gt;
        outputChatBox( &amp;quot;There are &amp;quot; .. #accountTable .. &amp;quot; accounts in this server!&amp;quot;, thePlayer )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;accountcount&amp;quot;, printAmountOfAccounts ) -- add a command handler for command 'accountcount'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Account functions}}&lt;/div&gt;</summary>
		<author><name>Rafael Schiedel</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetAircraftMaxHeight&amp;diff=26074</id>
		<title>SetAircraftMaxHeight</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetAircraftMaxHeight&amp;diff=26074"/>
		<updated>2011-06-15T09:28:49Z</updated>

		<summary type="html">&lt;p&gt;Rafael Schiedel: Created page with &amp;quot;__NOTOC__ {{Server client function}} This function changes the maximum flying height of aircraft.  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool setAircraftMaxHeight ( float Height ) &amp;lt;/syntaxhighlight&amp;gt;  ===R...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function changes the maximum flying height of aircraft.&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 setAircraftMaxHeight ( float Height )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''Height'''&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if successful, ''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;
This example shows you a command to set your maximum aircraft height.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function setAircraftHeight ( command, ve1 )&lt;br /&gt;
	local height = tonumber ( ve1 )&lt;br /&gt;
	if height then&lt;br /&gt;
		local wert = setAircraftMaxHeight ( height )&lt;br /&gt;
		if wert == true then&lt;br /&gt;
			outputChatBox ( &amp;quot;Aircraft heigt seted!&amp;quot;, 0, 200, 0 )&lt;br /&gt;
		else&lt;br /&gt;
			outputChatBox ( &amp;quot;Error to set Aircraft heigt!&amp;quot;, 255, 0, 0 ) &lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox ( &amp;quot;Error to set Aircraft heigt!&amp;quot;, 255, 0, 0 ) &lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;aircraft&amp;quot;, setAircraftHeight )&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_world_functions}}&lt;/div&gt;</summary>
		<author><name>Rafael Schiedel</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DE/setPedOnFire&amp;diff=25451</id>
		<title>DE/setPedOnFire</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DE/setPedOnFire&amp;diff=25451"/>
		<updated>2011-02-28T05:59:17Z</updated>

		<summary type="html">&lt;p&gt;Rafael Schiedel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
Diese Funktion überprüft das der [[ped]] schiesst.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isPedOnFire ( ped derPed )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''derPed''': Der [[ped]] zu überprüfen.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' wenn der schiesst, ''false'' wenn nicht.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section class=&amp;quot;server&amp;quot; name=&amp;quot;Server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Disese Funktion nimmt ein zufälligen Spieler und wenn er schiessen sollte bekommt er ne M4&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local player = getRandomPlayer()&lt;br /&gt;
if isPedOnFire ( player ) then&lt;br /&gt;
	giveWeapon ( player, 31, 150, true )&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;
==Andere sachen in Englisch==&lt;br /&gt;
{{Ped functions}}&lt;/div&gt;</summary>
		<author><name>Rafael Schiedel</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DE/setPedOnFire&amp;diff=25450</id>
		<title>DE/setPedOnFire</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DE/setPedOnFire&amp;diff=25450"/>
		<updated>2011-02-28T05:55:06Z</updated>

		<summary type="html">&lt;p&gt;Rafael Schiedel: Created page with &amp;quot;__NOTOC__ {{Server client function}} Diese Funktion überprüft das der ped schiesst.  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isPedOnFire ( ped derPed )&amp;lt;/syntaxhighlight&amp;gt;  ===Required Arguments==...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
Diese Funktion überprüft das der [[ped]] schiesst.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isPedOnFire ( ped derPed )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''derPed''': Der [[ped]] zu überprüfen.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' wenn der schiesst, ''false'' wenn nicht.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section class=&amp;quot;server&amp;quot; name=&amp;quot;Server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Disese Funktion nimmt ein zufälligen Spieler und wenn er schiessen sollte bekommt er ne M4&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local player = getRandomPlayer()&lt;br /&gt;
if isPedOnFire ( player ) then&lt;br /&gt;
	giveWeapon ( player, 31, 150, true )&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;
==See Also==&lt;br /&gt;
{{Ped functions}}&lt;/div&gt;</summary>
		<author><name>Rafael Schiedel</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPlayerConnect&amp;diff=24552</id>
		<title>OnPlayerConnect</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPlayerConnect&amp;diff=24552"/>
		<updated>2010-11-19T11:37:38Z</updated>

		<summary type="html">&lt;p&gt;Rafael Schiedel: Added, &amp;quot;Player has connected the Server&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server event}}&lt;br /&gt;
This event is triggered when a player attempts to connect to the server.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string playerNick, string playerIP, string playerUsername, string playerSerial, int playerVersionNumber, string playerVersionString&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''playerNick''': The player's current nickname.&lt;br /&gt;
*'''playerIP''': The player's current IP.&lt;br /&gt;
*'''playerUsername''': The player's community username.&lt;br /&gt;
*'''playerSerial''': The player's serial number.&lt;br /&gt;
''Extra parameter from 1.0.2 onwards:''&lt;br /&gt;
*'''playerVersionNumber''': The player's MTA version in pure numerical form, e.g. ''''256'''' for 1.0, ''''257'''' for 1.0.1, etc.&lt;br /&gt;
''Extra parameter from 1.0.4 onwards:''&lt;br /&gt;
*'''playerVersionString''': The player's MTA version in sortable string form. Same as the return value from [[getPlayerVersion]].&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], the player will be disconnected with an error message saying the reason specified in cancelEvent or &amp;quot;Disconnected: server refused the connection&amp;quot; if none was specified.&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;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example cancels connection attempts of people who use the nick &amp;quot;Player&amp;quot; or outputs some data about the connecting player otherwise.&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;
--when a player connects&lt;br /&gt;
function playerConnect (playerNick, playerIP, playerUsername, playerSerial, playerVersionNumber)&lt;br /&gt;
    if playerNick == &amp;quot;Player&amp;quot; then --check if his nick is &amp;quot;Player&amp;quot;&lt;br /&gt;
        cancelEvent(true,&amp;quot;The nick \&amp;quot;Player\&amp;quot; is not allowed, please change it to something else. You can change your nick in Settings menu Multiplayer tab.&amp;quot;) --in that case refuse the connection&lt;br /&gt;
    else&lt;br /&gt;
        --output some data about the player&lt;br /&gt;
        outputChatBox (playerNick..&amp;quot; just connected to the server.&amp;quot;)&lt;br /&gt;
        outputChatBox (&amp;quot;IP: &amp;quot;..playerIP..&amp;quot; Username: &amp;quot;..playerUsername..&amp;quot; Serial: &amp;quot;..playerSerial)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--add the playerConnect function as a handler for onPlayerConnect&lt;br /&gt;
addEventHandler (&amp;quot;onPlayerConnect&amp;quot;, getRootElement(), playerConnect)&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;
&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 cancels connection if player uses older MTA (older than 1.0.3)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler( &amp;quot;onPlayerConnect&amp;quot;, getRootElement(),&lt;br /&gt;
    function ( _,_,_,_, clientVersion )&lt;br /&gt;
        if ( clientVersion &amp;lt; 259 ) then&lt;br /&gt;
            cancelEvent( true, &amp;quot;Update your MTA before you join this server!&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;
&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 show the player in the Chatbox if connect the Server&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function playerConnect(playerNick, playerIP, playerUsername, playerSerial, playerVersionNumber)&lt;br /&gt;
    outputChatBox(&amp;quot;* &amp;quot; .. playerNick .. &amp;quot; has connected the Server.&amp;quot;, getRootElement(), 255, 100, 100, false)&lt;br /&gt;
    -- Show the Player Connect the Server, for all Users good&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerConnect&amp;quot;, getRootElement(), playerConnect)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
{{See also/Server event|Player events}}&lt;/div&gt;</summary>
		<author><name>Rafael Schiedel</name></author>
	</entry>
</feed>