<?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-24T07:28:25Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPedWeaponSlot&amp;diff=23547</id>
		<title>GetPedWeaponSlot</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPedWeaponSlot&amp;diff=23547"/>
		<updated>2010-05-24T10:04:29Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function gets a ped's selected weapon slot.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int getPedWeaponSlot ( ped thePed )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePed:''' the ped to get the current weapon slot of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the selected weapon slot ID on success, ''false'' otherwise.&lt;br /&gt;
{{Weapon_Slots}}&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;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function(source)&lt;br /&gt;
	local pedSlot = getPedWeaponSlot ( source )&lt;br /&gt;
	if (pedSlot == 0)	then&lt;br /&gt;
		outputChatBox(&amp;quot;Your weapon is not in your hands ;)&amp;quot;, source)&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;
==See Also==&lt;br /&gt;
{{Ped functions}}&lt;/div&gt;</summary>
		<author><name>EXtrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPedWeaponSlot&amp;diff=23546</id>
		<title>GetPedWeaponSlot</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPedWeaponSlot&amp;diff=23546"/>
		<updated>2010-05-24T10:03:58Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function gets a ped's selected weapon slot.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int getPedWeaponSlot ( ped thePed )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePed:''' the ped to get the current weapon slot of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the selected weapon slot ID on success, ''false'' otherwise.&lt;br /&gt;
{{Weapon_Slots}}&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;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function(source)&lt;br /&gt;
	local pedSlot = getPedWeaponSlot ( source )&lt;br /&gt;
	if (pedSlot == 0)	then&lt;br /&gt;
		outputChatBox(&amp;quot;Your weapon is not in your hands ;)&amp;quot;, source)&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;
==See Also==&lt;br /&gt;
{{Ped 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=GetPedWeaponSlot&amp;diff=23545</id>
		<title>GetPedWeaponSlot</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPedWeaponSlot&amp;diff=23545"/>
		<updated>2010-05-24T10:02:37Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function gets a ped's selected weapon slot.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int getPedWeaponSlot ( ped thePed )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePed:''' the ped to get the current weapon slot of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the selected weapon slot ID on success, ''false'' otherwise.&lt;br /&gt;
{{Weapon_Slots}}&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;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function(source)&lt;br /&gt;
	local pedSlot = getPedWeaponSlot ( source )&lt;br /&gt;
	if (pedSlot == 0)	then&lt;br /&gt;
		outputChatBox(&amp;quot;Weapons of you not in the hands ;)&amp;quot;, source)&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;
==See Also==&lt;br /&gt;
{{Ped 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=GetPedWeaponSlot&amp;diff=23544</id>
		<title>GetPedWeaponSlot</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPedWeaponSlot&amp;diff=23544"/>
		<updated>2010-05-24T10:02:12Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function gets a ped's selected weapon slot.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int getPedWeaponSlot ( ped thePed )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePed:''' the ped to get the current weapon slot of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the selected weapon slot ID on success, ''false'' otherwise.&lt;br /&gt;
{{Weapon_Slots}}&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;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function(source)&lt;br /&gt;
	local pedSlot = getPedWeaponSlot ( source )&lt;br /&gt;
	if (pedSlot) == 0	then&lt;br /&gt;
		outputChatBox(&amp;quot;Weapons of you not in the hands ;)&amp;quot;, source)&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;
==See Also==&lt;br /&gt;
{{Ped 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=GetPedWeaponSlot&amp;diff=23543</id>
		<title>GetPedWeaponSlot</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPedWeaponSlot&amp;diff=23543"/>
		<updated>2010-05-24T10:01:49Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function gets a ped's selected weapon slot.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int getPedWeaponSlot ( ped thePed )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePed:''' the ped to get the current weapon slot of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the selected weapon slot ID on success, ''false'' otherwise.&lt;br /&gt;
{{Weapon_Slots}}&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(source)&lt;br /&gt;
	local pedSlot = getPedWeaponSlot ( source )&lt;br /&gt;
	if (pedSlot) == 0	then&lt;br /&gt;
		outputChatBox(&amp;quot;Weapons of you not in the hands ;)&amp;quot;, source)&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;
{{Ped 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=FileDelete&amp;diff=23542</id>
		<title>FileDelete</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FileDelete&amp;diff=23542"/>
		<updated>2010-05-24T09:58:12Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
Deletes the specified file.&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 fileDelete ( string filePath )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''filePath:''' The [[filepath]] of the file to delete in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if you want to delete a file name &amp;quot;myFile.txt&amp;quot; in the resource 'fileres', it can be deleted from another resource this way: ''fileDelete(&amp;quot;:fileres/myFile.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileDelete(&amp;quot;myFile.txt&amp;quot;)''.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if successful, ''false'' otherwise (for example if there exists no file with the given name, or it does exist but is in use).&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 will show us how to create a file &amp;quot;text.txt&amp;quot; spell it &amp;quot;This is a test file!&amp;quot;, Close the file and delete it:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local newFile = fileCreate(&amp;quot;test.txt&amp;quot;)                -- attempt to create a new file&lt;br /&gt;
if (newFile) then                                     -- check if the creation succeeded&lt;br /&gt;
    fileWrite(newFile, &amp;quot;This is a test file!&amp;quot;)        -- write a text line&lt;br /&gt;
    fileClose(newFile)                                -- close the file once you're done with it&lt;br /&gt;
    fileDelete(newFile)                               -- delete file&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;
{{File_functions}}&lt;/div&gt;</summary>
		<author><name>EXtrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=FileGetSize&amp;diff=23541</id>
		<title>FileGetSize</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FileGetSize&amp;diff=23541"/>
		<updated>2010-05-24T09:57:38Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
&lt;br /&gt;
Returns the total size in bytes of the given file.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int fileGetSize ( file theFile )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theFile:''' the file handle you wish to get the size of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the file size if successful, or ''false'' if an error occured (e.g. an invalid file handle was passed).&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;
In this example we will upload any (in the example config.xml) xml file and create a copy in a new folder with the name of copy-config.xml&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function()&lt;br /&gt;
	local newFile = fileCreate(&amp;quot;test.txt&amp;quot;)                -- attempt to create a new file&lt;br /&gt;
	if (newFile) then                                       -- check if the creation succeeded&lt;br /&gt;
		fileWrite(newFile, &amp;quot;This is a test file!&amp;quot;)        -- write a text line&lt;br /&gt;
		local size = fileGetSize ( newFile )              -- get size&lt;br /&gt;
		if	size	then&lt;br /&gt;
			outputChatBox(&amp;quot;Size of test.txt is: &amp;quot; .. size, source) -- output size&lt;br /&gt;
		else&lt;br /&gt;
			outputChatBox(&amp;quot;Sorry, test.txt dont have size ;)&amp;quot;, source)&lt;br /&gt;
                end&lt;br /&gt;
		fileClose(newFile)                                -- close the file once you're done with it&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;
==See Also==&lt;br /&gt;
{{File functions}}&lt;/div&gt;</summary>
		<author><name>EXtrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=FileGetSize&amp;diff=23540</id>
		<title>FileGetSize</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FileGetSize&amp;diff=23540"/>
		<updated>2010-05-24T09:56:32Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
&lt;br /&gt;
Returns the total size in bytes of the given file.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int fileGetSize ( file theFile )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theFile:''' the file handle you wish to get the size of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the file size if successful, or ''false'' if an error occured (e.g. an invalid file handle was passed).&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;
In this example we will upload any (in the example config.xml) xml file and create a copy in a new folder with the name of copy-config.xml&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function()&lt;br /&gt;
	local newFile = fileCreate(&amp;quot;test.txt&amp;quot;)                -- attempt to create a new file&lt;br /&gt;
	if (newFile) then                                       -- check if the creation succeeded&lt;br /&gt;
		fileWrite(newFile, &amp;quot;This is a test file!&amp;quot;)        -- write a text line&lt;br /&gt;
		local size = fileGetSize ( newFile )              -- get size&lt;br /&gt;
		if	size	then&lt;br /&gt;
			outputChatBox(&amp;quot;Size of test.txt is: &amp;quot; .. size, source) -- output size&lt;br /&gt;
		else&lt;br /&gt;
			outputChatBox(&amp;quot;Sorry, test.txt dont have size ;)&amp;quot;, source)&lt;br /&gt;
                end&lt;br /&gt;
		fileClose(newFile)                                -- close the file once you're done with it&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;
==See Also==&lt;br /&gt;
{{File 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=FileGetSize&amp;diff=23539</id>
		<title>FileGetSize</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FileGetSize&amp;diff=23539"/>
		<updated>2010-05-24T09:56:15Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
&lt;br /&gt;
Returns the total size in bytes of the given file.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int fileGetSize ( file theFile )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theFile:''' the file handle you wish to get the size of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the file size if successful, or ''false'' if an error occured (e.g. an invalid file handle was passed).&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;
In this example we will upload any (in the example config.xml) xml file and create a copy in a new folder with the name of copy-config.xml&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function()&lt;br /&gt;
	local newFile = fileCreate(&amp;quot;test.txt&amp;quot;)                -- attempt to create a new file&lt;br /&gt;
	if (newFile) then                                       -- check if the creation succeeded&lt;br /&gt;
		fileWrite(newFile, &amp;quot;This is a test file!&amp;quot;)        -- write a text line&lt;br /&gt;
		local size = fileGetSize ( newFile )              -- get size&lt;br /&gt;
		if	size	then&lt;br /&gt;
			outputChatBox(&amp;quot;Size of test.txt is: &amp;quot; .. size, source) -- output size&lt;br /&gt;
		else&lt;br /&gt;
			outputChatBox(&amp;quot;Sorry, test.txt dont have size ;)&amp;quot;, source)&lt;br /&gt;
		fileClose(newFile)                                -- close the file once you're done with it&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;
==See Also==&lt;br /&gt;
{{File 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=XmlCopyFile&amp;diff=23538</id>
		<title>XmlCopyFile</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlCopyFile&amp;diff=23538"/>
		<updated>2010-05-24T09:50:57Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function copies all contents of a certain node in a XML document to a new document file, so the copied node becomes the new file's root node.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
xmlnode xmlCopyFile ( xmlnode nodeToCopy, string newFilePath )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''nodeToCopy:''' the [[xmlnode]] that is to be copied to a new document.&lt;br /&gt;
*'''newFilePath:''' the path of the file that is to be created, in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, to create a file named 'newfile.xml' with myNode as the root node in the resource 'ctf', it can be done from another resource this way: ''xmlCopyFile(myNode, &amp;quot;:ctf/newfile.xml&amp;quot;)''.&lt;br /&gt;
:If the file is to be in the current resource, only the file path is necessary, e.g. ''xmlCopyFile(myNode, &amp;quot;newfile.xml&amp;quot;)''.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[xmlnode]] if the node was successfully copied, ''false'' if invalid arguments were passed.&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;
In this example we will upload any (in the example config.xml) xml file and create a copy in a new folder with the name of copy-config.xml:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function()&lt;br /&gt;
	local config = xmlLoadFile ( &amp;quot;config.xml&amp;quot; )&lt;br /&gt;
	xmlCopyFile ( config, &amp;quot;copy/copy-config.xml&amp;quot; )&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;
{{XML_functions}}&lt;/div&gt;</summary>
		<author><name>EXtrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=FileDelete&amp;diff=23537</id>
		<title>FileDelete</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FileDelete&amp;diff=23537"/>
		<updated>2010-05-24T09:43:27Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
Deletes the specified file.&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 fileDelete ( string filePath )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''filePath:''' The [[filepath]] of the file to delete in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if you want to delete a file name &amp;quot;myFile.txt&amp;quot; in the resource 'fileres', it can be deleted from another resource this way: ''fileDelete(&amp;quot;:fileres/myFile.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileDelete(&amp;quot;myFile.txt&amp;quot;)''.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if successful, ''false'' otherwise (for example if there exists no file with the given name, or it does exist but is in use).&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 will show us how to create a file &amp;quot;text.txt&amp;quot; spell it &amp;quot;This is a test file!&amp;quot;, Close the file and delete it:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local newFile = fileCreate(&amp;quot;test.txt&amp;quot;)                -- attempt to create a new file&lt;br /&gt;
if (newFile) then                                     -- check if the creation succeeded&lt;br /&gt;
    fileWrite(newFile, &amp;quot;This is a test file!&amp;quot;)        -- write a text line&lt;br /&gt;
    fileClose(newFile)                                -- close the file once you're done with it&lt;br /&gt;
    fileDelete(newFile)                               -- delete file&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;
{{File_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=FileDelete&amp;diff=23536</id>
		<title>FileDelete</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FileDelete&amp;diff=23536"/>
		<updated>2010-05-24T09:41:24Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
Deletes the specified file.&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 fileDelete ( string filePath )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''filePath:''' The [[filepath]] of the file to delete in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if you want to delete a file name &amp;quot;myFile.txt&amp;quot; in the resource 'fileres', it can be deleted from another resource this way: ''fileDelete(&amp;quot;:fileres/myFile.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileDelete(&amp;quot;myFile.txt&amp;quot;)''.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if successful, ''false'' otherwise (for example if there exists no file with the given name, or it does exist but is in use).&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;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local newFile = fileCreate(&amp;quot;test.txt&amp;quot;)                -- attempt to create a new file&lt;br /&gt;
if (newFile) then                                     -- check if the creation succeeded&lt;br /&gt;
    fileWrite(newFile, &amp;quot;This is a test file!&amp;quot;)        -- write a text line&lt;br /&gt;
    fileClose(newFile)                                -- close the file once you're done with it&lt;br /&gt;
    fileDelete(newFile)                               -- delete file&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;
{{File_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=XmlCreateSubNode&amp;diff=23535</id>
		<title>XmlCreateSubNode</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlCreateSubNode&amp;diff=23535"/>
		<updated>2010-05-24T09:39:03Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
{{Deprecated}}&lt;br /&gt;
This function creates a subnode for a specified XML node.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;xmlnode xmlCreateSubNode ( xmlnode parentNode, string tagname )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''parentNode:''' the [[xmlnode]] you want to create a subnode of.&lt;br /&gt;
*'''tagname:''' the type of the subnode that will be created.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the created [[xmlnode]] if successful, ''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;
We need to create a new node between the tags &amp;lt;config&amp;gt; and &amp;lt;/ config&amp;gt;.&lt;br /&gt;
config.xml:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;config&amp;gt;&lt;br /&gt;
    &amp;lt;newnode&amp;gt;somevalue&amp;lt;/newnode&amp;gt;&lt;br /&gt;
&amp;lt;/config&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Lua code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function()&lt;br /&gt;
    config = xmlLoadFile(&amp;quot;config.xml&amp;quot;)&lt;br /&gt;
    local newNode = xmlCreateSubNode ( config, &amp;quot;newnode&amp;quot; )&lt;br /&gt;
    xmlNodeSetValue ( newNode, &amp;quot;somevalue&amp;quot; )&lt;br /&gt;
    xmlSaveFile( config )&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;
{{XML functions}}&lt;/div&gt;</summary>
		<author><name>EXtrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=XmlCreateSubNode&amp;diff=23534</id>
		<title>XmlCreateSubNode</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlCreateSubNode&amp;diff=23534"/>
		<updated>2010-05-24T09:38:40Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
{{Deprecated}}&lt;br /&gt;
This function creates a subnode for a specified XML node.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;xmlnode xmlCreateSubNode ( xmlnode parentNode, string tagname )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''parentNode:''' the [[xmlnode]] you want to create a subnode of.&lt;br /&gt;
*'''tagname:''' the type of the subnode that will be created.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the created [[xmlnode]] if successful, ''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;
We need to create a new node between the tags &amp;lt;config&amp;gt; and &amp;lt;/ config&amp;gt;.&lt;br /&gt;
config.xml:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;config&amp;gt;&lt;br /&gt;
    &amp;lt;newnode&amp;gt;somevalue&amp;lt;/newnode&amp;gt;&lt;br /&gt;
&amp;lt;/config&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Lua code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function()&lt;br /&gt;
    config = xmlLoadFile(&amp;quot;config.xml&amp;quot;)&lt;br /&gt;
    local newNode = xmlCreateSubNode ( config, &amp;quot;newnode&amp;quot; )&lt;br /&gt;
    xmlNodeSetValue ( newNode, &amp;quot;somevalue&amp;quot; )&lt;br /&gt;
    xmlSaveFile( config )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{XML functions}}&lt;/div&gt;</summary>
		<author><name>EXtrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AddAccount&amp;diff=22917</id>
		<title>AddAccount</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AddAccount&amp;diff=22917"/>
		<updated>2010-04-18T07:54:23Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function adds an account to the list of registered accounts of the current server.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd --&amp;gt;&lt;br /&gt;
{{New feature|3|1.0 r848|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
account addAccount ( string name, string pass )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool addAccount ( string name, string pass )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
&amp;lt;!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type --&amp;gt;&lt;br /&gt;
*'''name:''' The name of the account you wish to make, this normally is the player's name.&lt;br /&gt;
*'''pass:''' The password to set for this account for future logins.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&amp;lt;!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --&amp;gt;&lt;br /&gt;
{{New feature|3|1.0 r848|&lt;br /&gt;
Returns the ''account'' element if the account was created, ''false'' if the account already exists or an error occured.&lt;br /&gt;
}}&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
Returns ''true'' if the account was created, ''false'' if the account already exists or an error occured.&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;
'''Example 1:''' This enables players to register on your server by using /register &amp;lt;password&amp;gt; in the chat window.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function registerPlayer ( source, commandName, password )&lt;br /&gt;
	-- Check if the password field is blank or not (only blank if they didnt enter one)&lt;br /&gt;
	if ( password ~= &amp;quot;&amp;quot; and password ~= nil ) then&lt;br /&gt;
		--Attempt to add the account, and save its value in a var&lt;br /&gt;
		local accountAdded = addAccount( getPlayerName(source), password )&lt;br /&gt;
		if ( accountAdded ) then&lt;br /&gt;
			--  Tell the user all is done&lt;br /&gt;
			outputChatBox ( &amp;quot;Thank you &amp;quot; .. getPlayerName(source) .. &amp;quot;, you're now registed, you can login with /login&amp;quot;, source )&lt;br /&gt;
		else&lt;br /&gt;
			-- There was an error making the account, tell the user&lt;br /&gt;
			outputChatBox ( &amp;quot;Error creating account, contact the server admin&amp;quot;, source )&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		-- There was an error in the syntax, tell the user the correct syntax.&lt;br /&gt;
		outputChatBox ( &amp;quot;Error creating account, correct syntax: /register &amp;lt;password&amp;gt;&amp;quot;, source )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;register&amp;quot;, registerPlayer ) -- add the command handler&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''This code differs by allowing the user to change their username that they wish to use.'''&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This enables players to register on your server by using /register &amp;lt;username&amp;gt; &amp;lt;password&amp;gt; in the chat window.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function registerPlayer ( source, commandName, username, password )&lt;br /&gt;
        if(password ~= &amp;quot;&amp;quot; and password ~= nil and username ~= &amp;quot;&amp;quot; and username ~= nil) then&lt;br /&gt;
                local accountAdded = addAccount(username,password)&lt;br /&gt;
                if(accountAdded) then&lt;br /&gt;
                        outputChatBox(&amp;quot;Thank you &amp;quot; .. getPlayerName(source) .. &amp;quot;, you're now registed, you can login with /login&amp;quot;,source)&lt;br /&gt;
                else&lt;br /&gt;
                        outputChatBox(&amp;quot;Error creating account, contact the server admin.&amp;quot;,source)&lt;br /&gt;
                end&lt;br /&gt;
        else&lt;br /&gt;
                outputChatBox(&amp;quot;Error creating account, correct syntax: /register &amp;lt;nick&amp;gt; &amp;lt;pass&amp;gt;&amp;quot;,source)&lt;br /&gt;
        end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;register&amp;quot;, registerPlayer ) -- add the command handler&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 3:''' This code differs again so the user can only register once /register &amp;lt;username&amp;gt; &amp;lt;password&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local bRegisteredOnce = false&lt;br /&gt;
&lt;br /&gt;
function registerPlayer ( source, commandName, username, password )&lt;br /&gt;
        if(password ~= &amp;quot;&amp;quot; and password ~= nil and username ~= &amp;quot;&amp;quot; and username ~= nil and bRegisteredOnce == false) then&lt;br /&gt;
                local accountAdded = addAccount(username,password)&lt;br /&gt;
                if(accountAdded) then&lt;br /&gt;
                        outputChatBox(&amp;quot;Thank you &amp;quot; .. getPlayerName(source) .. &amp;quot;, you're now registed, you can login with /login&amp;quot;,source)&lt;br /&gt;
                        bRegisteredOnce = true&lt;br /&gt;
                else&lt;br /&gt;
                        outputChatBox(&amp;quot;Error creating account, contact the server admin.&amp;quot;,source)&lt;br /&gt;
                end&lt;br /&gt;
        else&lt;br /&gt;
                if bRegisteredOnce == true then&lt;br /&gt;
                    outputChatBox(&amp;quot;You already registered on this server!&amp;quot;,source)&lt;br /&gt;
                else&lt;br /&gt;
                    outputChatBox(&amp;quot;Error creating account, correct syntax: /register &amp;lt;nick&amp;gt; &amp;lt;pass&amp;gt;&amp;quot;,source)&lt;br /&gt;
                end&lt;br /&gt;
        end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;register&amp;quot;, registerPlayer ) -- add the command handler&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;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{Account_functions}}&lt;/div&gt;</summary>
		<author><name>EXtrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Account_functions&amp;diff=22916</id>
		<title>Template:Account functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Account_functions&amp;diff=22916"/>
		<updated>2010-04-18T07:53:29Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[addAccount]]&lt;br /&gt;
*[[copyAccountData]]&lt;br /&gt;
*[[getAccount]]&lt;br /&gt;
*[[getAccountData]]&lt;br /&gt;
*[[getAccountName]]&lt;br /&gt;
*[[getAccounts]]&lt;br /&gt;
*[[isGuestAccount]]&lt;br /&gt;
*[[logIn]]&lt;br /&gt;
*[[logOut]]&lt;br /&gt;
*[[removeAccount]]&lt;br /&gt;
*[[setAccountData]]&lt;br /&gt;
*[[setAccountPassword]]&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
*[[getAccountPlayer]]&lt;br /&gt;
}}&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
*[[getAccountClient]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>EXtrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Account_functions&amp;diff=22915</id>
		<title>Template:Account functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Account_functions&amp;diff=22915"/>
		<updated>2010-04-18T07:53:10Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[RU/addAccount]]&lt;br /&gt;
*[[copyAccountData]]&lt;br /&gt;
*[[getAccount]]&lt;br /&gt;
*[[getAccountData]]&lt;br /&gt;
*[[getAccountName]]&lt;br /&gt;
*[[getAccounts]]&lt;br /&gt;
*[[isGuestAccount]]&lt;br /&gt;
*[[logIn]]&lt;br /&gt;
*[[logOut]]&lt;br /&gt;
*[[removeAccount]]&lt;br /&gt;
*[[setAccountData]]&lt;br /&gt;
*[[setAccountPassword]]&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
*[[getAccountPlayer]]&lt;br /&gt;
}}&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
*[[getAccountClient]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>EXtrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/Server_Scripting_Functions&amp;diff=22914</id>
		<title>RU/Server Scripting Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/Server_Scripting_Functions&amp;diff=22914"/>
		<updated>2010-04-18T07:52:48Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{translate}}&lt;br /&gt;
&amp;lt;pageclass class=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt;&lt;br /&gt;
Здесь приведены все [[event|функции скриптов]], выполняемые на '''серверной стороне''', которые уже встроены в мод. Для консультации по работе функций или событий посети [[Requested Functions and Events|эту страницу]].&lt;br /&gt;
&lt;br /&gt;
Прошу заметить, что скриптовые функции могут быть расширены при загрузке  в динамических модулях, которые обеспечивают новые функции, такие как доступ к базе данных MySQL. Эти функции не встроены в мод и требуют модуль чтобы загрузить для готовности.&lt;br /&gt;
&lt;br /&gt;
Зайдите на [[Module functions|эту страницу]] для ознакомления с функциями, которые не встроены в мод, однако доступны для пользования.&lt;br /&gt;
&lt;br /&gt;
'''Функции для работы на клиентской стороне вы можете найти здесь: [[RU/Client Scripting Functions|Клиентские Функции Скриптинга]].'''&lt;br /&gt;
&lt;br /&gt;
==Функции аккаунта==&lt;br /&gt;
{{Account_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции ACL==&lt;br /&gt;
{{ACL_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции администрирования==&lt;br /&gt;
{{RU/Admin_functions}}&lt;br /&gt;
&lt;br /&gt;
==Аудио функции==&lt;br /&gt;
{{Audio_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции объявления==&lt;br /&gt;
{{Announce_functions}}&lt;br /&gt;
&lt;br /&gt;
==Blip функции==&lt;br /&gt;
{{Blip_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции камеры==&lt;br /&gt;
{{Camera functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции формы столкновения==&lt;br /&gt;
{{Collision shape functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции клиента==&lt;br /&gt;
{{Client functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции тела и одежды==&lt;br /&gt;
{{Clothes and body functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции курсора==&lt;br /&gt;
{{Cursor_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции элементов==&lt;br /&gt;
{{Element functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции событий==&lt;br /&gt;
{{Event_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции взрывов==&lt;br /&gt;
{{Explosion_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции файлов==&lt;br /&gt;
{{File_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции HTTP==&lt;br /&gt;
{{HTTP_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции ввода==&lt;br /&gt;
{{Input_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции карты==&lt;br /&gt;
{{Map_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции маркеров==&lt;br /&gt;
{{Marker functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции объектов==&lt;br /&gt;
{{Object functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции пикапов==&lt;br /&gt;
{{Pickup functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции игрока==&lt;br /&gt;
{{Player functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции области радара==&lt;br /&gt;
{{Radar area functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции ресурсов==&lt;br /&gt;
{{Resource functions}}&lt;br /&gt;
&lt;br /&gt;
==Серийные функции==&lt;br /&gt;
{{Serial functions}}&lt;br /&gt;
&lt;br /&gt;
==Серверные функции==&lt;br /&gt;
{{Server functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции настройки реестра==&lt;br /&gt;
{{RU/Settings registry functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции SQL==&lt;br /&gt;
{{SQL_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции команды==&lt;br /&gt;
{{Team functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции текста==&lt;br /&gt;
{{Text functions}}&lt;br /&gt;
&lt;br /&gt;
==Полезные функции==&lt;br /&gt;
{{Utility functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции транспорта==&lt;br /&gt;
{{Vehicle functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции оружия==&lt;br /&gt;
{{RU/Weapon functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции мира==&lt;br /&gt;
{{RU/World functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции XML==&lt;br /&gt;
{{XML functions}}&lt;br /&gt;
&lt;br /&gt;
==Устаревшие функции==&lt;br /&gt;
Access: [http://development.mtasa.com/index.php?title=Category:Depreciated &amp;lt;nowiki&amp;gt;[[Category:Depreciated]]&amp;lt;/nowiki&amp;gt; ]&amp;lt;br&amp;gt;&lt;br /&gt;
''Note: dont change this, done purposely to keep this page from being included in the listing.''&lt;br /&gt;
[[en:Server Scripting Functions]]&lt;/div&gt;</summary>
		<author><name>EXtrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/Server_Scripting_Functions&amp;diff=22913</id>
		<title>RU/Server Scripting Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/Server_Scripting_Functions&amp;diff=22913"/>
		<updated>2010-04-18T07:52:29Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{translate}}&lt;br /&gt;
&amp;lt;pageclass class=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt;&lt;br /&gt;
Здесь приведены все [[event|функции скриптов]], выполняемые на '''серверной стороне''', которые уже встроены в мод. Для консультации по работе функций или событий посети [[Requested Functions and Events|эту страницу]].&lt;br /&gt;
&lt;br /&gt;
Прошу заметить, что скриптовые функции могут быть расширены при загрузке  в динамических модулях, которые обеспечивают новые функции, такие как доступ к базе данных MySQL. Эти функции не встроены в мод и требуют модуль чтобы загрузить для готовности.&lt;br /&gt;
&lt;br /&gt;
Зайдите на [[Module functions|эту страницу]] для ознакомления с функциями, которые не встроены в мод, однако доступны для пользования.&lt;br /&gt;
&lt;br /&gt;
'''Функции для работы на клиентской стороне вы можете найти здесь: [[RU/Client Scripting Functions|Клиентские Функции Скриптинга]].'''&lt;br /&gt;
&lt;br /&gt;
==Функции аккаунта==&lt;br /&gt;
{{RU/Account_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции ACL==&lt;br /&gt;
{{ACL_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции администрирования==&lt;br /&gt;
{{RU/Admin_functions}}&lt;br /&gt;
&lt;br /&gt;
==Аудио функции==&lt;br /&gt;
{{Audio_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции объявления==&lt;br /&gt;
{{Announce_functions}}&lt;br /&gt;
&lt;br /&gt;
==Blip функции==&lt;br /&gt;
{{Blip_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции камеры==&lt;br /&gt;
{{Camera functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции формы столкновения==&lt;br /&gt;
{{Collision shape functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции клиента==&lt;br /&gt;
{{Client functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции тела и одежды==&lt;br /&gt;
{{Clothes and body functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции курсора==&lt;br /&gt;
{{Cursor_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции элементов==&lt;br /&gt;
{{Element functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции событий==&lt;br /&gt;
{{Event_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции взрывов==&lt;br /&gt;
{{Explosion_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции файлов==&lt;br /&gt;
{{File_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции HTTP==&lt;br /&gt;
{{HTTP_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции ввода==&lt;br /&gt;
{{Input_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции карты==&lt;br /&gt;
{{Map_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции маркеров==&lt;br /&gt;
{{Marker functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции объектов==&lt;br /&gt;
{{Object functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции пикапов==&lt;br /&gt;
{{Pickup functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции игрока==&lt;br /&gt;
{{Player functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции области радара==&lt;br /&gt;
{{Radar area functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции ресурсов==&lt;br /&gt;
{{Resource functions}}&lt;br /&gt;
&lt;br /&gt;
==Серийные функции==&lt;br /&gt;
{{Serial functions}}&lt;br /&gt;
&lt;br /&gt;
==Серверные функции==&lt;br /&gt;
{{Server functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции настройки реестра==&lt;br /&gt;
{{RU/Settings registry functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции SQL==&lt;br /&gt;
{{SQL_functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции команды==&lt;br /&gt;
{{Team functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции текста==&lt;br /&gt;
{{Text functions}}&lt;br /&gt;
&lt;br /&gt;
==Полезные функции==&lt;br /&gt;
{{Utility functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции транспорта==&lt;br /&gt;
{{Vehicle functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции оружия==&lt;br /&gt;
{{RU/Weapon functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции мира==&lt;br /&gt;
{{RU/World functions}}&lt;br /&gt;
&lt;br /&gt;
==Функции XML==&lt;br /&gt;
{{XML functions}}&lt;br /&gt;
&lt;br /&gt;
==Устаревшие функции==&lt;br /&gt;
Access: [http://development.mtasa.com/index.php?title=Category:Depreciated &amp;lt;nowiki&amp;gt;[[Category:Depreciated]]&amp;lt;/nowiki&amp;gt; ]&amp;lt;br&amp;gt;&lt;br /&gt;
''Note: dont change this, done purposely to keep this page from being included in the listing.''&lt;br /&gt;
[[en:Server Scripting Functions]]&lt;/div&gt;</summary>
		<author><name>EXtrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AddAccount&amp;diff=22900</id>
		<title>AddAccount</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AddAccount&amp;diff=22900"/>
		<updated>2010-04-18T07:26:21Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Эта функция добавляет учетную запись в список зарегистрированных счетов текущего сервера..&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd --&amp;gt;&lt;br /&gt;
{{New feature|3|1.0 r848|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
account addAccount ( string name, string pass )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool addAccount ( string name, string pass )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
&amp;lt;!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type --&amp;gt;&lt;br /&gt;
*'''name:''' The name of the account you wish to make, this normally is the player's name.&lt;br /&gt;
*'''pass:''' The password to set for this account for future logins.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&amp;lt;!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --&amp;gt;&lt;br /&gt;
{{New feature|3|1.0 r848|&lt;br /&gt;
Returns the ''account'' element if the account was created, ''false'' if the account already exists or an error occured.&lt;br /&gt;
}}&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
Returns ''true'' if the account was created, ''false'' if the account already exists or an error occured.&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;
'''Example 1:''' This enables players to register on your server by using /register &amp;lt;password&amp;gt; in the chat window.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function registerPlayer ( source, commandName, password )&lt;br /&gt;
	-- Check if the password field is blank or not (only blank if they didnt enter one)&lt;br /&gt;
	if ( password ~= &amp;quot;&amp;quot; and password ~= nil ) then&lt;br /&gt;
		--Attempt to add the account, and save its value in a var&lt;br /&gt;
		local accountAdded = addAccount( getPlayerName(source), password )&lt;br /&gt;
		if ( accountAdded ) then&lt;br /&gt;
			--  Tell the user all is done&lt;br /&gt;
			outputChatBox ( &amp;quot;Thank you &amp;quot; .. getPlayerName(source) .. &amp;quot;, you're now registed, you can login with /login&amp;quot;, source )&lt;br /&gt;
		else&lt;br /&gt;
			-- There was an error making the account, tell the user&lt;br /&gt;
			outputChatBox ( &amp;quot;Error creating account, contact the server admin&amp;quot;, source )&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		-- There was an error in the syntax, tell the user the correct syntax.&lt;br /&gt;
		outputChatBox ( &amp;quot;Error creating account, correct syntax: /register &amp;lt;password&amp;gt;&amp;quot;, source )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;register&amp;quot;, registerPlayer ) -- add the command handler&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''This code differs by allowing the user to change their username that they wish to use.'''&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This enables players to register on your server by using /register &amp;lt;username&amp;gt; &amp;lt;password&amp;gt; in the chat window.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function registerPlayer ( source, commandName, username, password )&lt;br /&gt;
        if(password ~= &amp;quot;&amp;quot; and password ~= nil and username ~= &amp;quot;&amp;quot; and username ~= nil) then&lt;br /&gt;
                local accountAdded = addAccount(username,password)&lt;br /&gt;
                if(accountAdded) then&lt;br /&gt;
                        outputChatBox(&amp;quot;Thank you &amp;quot; .. getPlayerName(source) .. &amp;quot;, you're now registed, you can login with /login&amp;quot;,source)&lt;br /&gt;
                else&lt;br /&gt;
                        outputChatBox(&amp;quot;Error creating account, contact the server admin.&amp;quot;,source)&lt;br /&gt;
                end&lt;br /&gt;
        else&lt;br /&gt;
                outputChatBox(&amp;quot;Error creating account, correct syntax: /register &amp;lt;nick&amp;gt; &amp;lt;pass&amp;gt;&amp;quot;,source)&lt;br /&gt;
        end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;register&amp;quot;, registerPlayer ) -- add the command handler&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 3:''' This code differs again so the user can only register once /register &amp;lt;username&amp;gt; &amp;lt;password&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local bRegisteredOnce = false&lt;br /&gt;
&lt;br /&gt;
function registerPlayer ( source, commandName, username, password )&lt;br /&gt;
        if(password ~= &amp;quot;&amp;quot; and password ~= nil and username ~= &amp;quot;&amp;quot; and username ~= nil and bRegisteredOnce == false) then&lt;br /&gt;
                local accountAdded = addAccount(username,password)&lt;br /&gt;
                if(accountAdded) then&lt;br /&gt;
                        outputChatBox(&amp;quot;Thank you &amp;quot; .. getPlayerName(source) .. &amp;quot;, you're now registed, you can login with /login&amp;quot;,source)&lt;br /&gt;
                        bRegisteredOnce = true&lt;br /&gt;
                else&lt;br /&gt;
                        outputChatBox(&amp;quot;Error creating account, contact the server admin.&amp;quot;,source)&lt;br /&gt;
                end&lt;br /&gt;
        else&lt;br /&gt;
                if bRegisteredOnce == true then&lt;br /&gt;
                    outputChatBox(&amp;quot;You already registered on this server!&amp;quot;,source)&lt;br /&gt;
                else&lt;br /&gt;
                    outputChatBox(&amp;quot;Error creating account, correct syntax: /register &amp;lt;nick&amp;gt; &amp;lt;pass&amp;gt;&amp;quot;,source)&lt;br /&gt;
                end&lt;br /&gt;
        end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;register&amp;quot;, registerPlayer ) -- add the command handler&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;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{Account_functions}}&lt;/div&gt;</summary>
		<author><name>EXtrike</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=FileDelete&amp;diff=22897</id>
		<title>FileDelete</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FileDelete&amp;diff=22897"/>
		<updated>2010-04-18T07:17:28Z</updated>

		<summary type="html">&lt;p&gt;EXtrike: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
Deletes the specified file.&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 fileDelete ( string filePath )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''filePath:''' The [[filepath]] of the file to delete in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file is in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if you want to delete a file name &amp;quot;myFile.txt&amp;quot; in the resource 'fileres', it can be deleted from another resource this way: ''fileDelete(&amp;quot;:fileres/myFile.txt&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''fileDelete(&amp;quot;myFile.txt&amp;quot;)''.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if successful, ''false'' otherwise (for example if there exists no file with the given name, or it does exist but is in use).&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local newFile = fileCreate(&amp;quot;test.txt&amp;quot;)                -- attempt to create a new file&lt;br /&gt;
if (newFile) then                                     -- check if the creation succeeded&lt;br /&gt;
    fileWrite(newFile, &amp;quot;This is a test file!&amp;quot;)        -- write a text line&lt;br /&gt;
    fileClose(newFile)                                -- close the file once you're done with it&lt;br /&gt;
    fileDelete(newFile)                               -- delete file&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{File_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>EXtrike</name></author>
	</entry>
</feed>