<?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=Dpower</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=Dpower"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Dpower"/>
	<updated>2026-05-16T06:30:07Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:Dpower&amp;diff=45811</id>
		<title>User:Dpower</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:Dpower&amp;diff=45811"/>
		<updated>2015-09-01T14:10:26Z</updated>

		<summary type="html">&lt;p&gt;Dpower: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dpower</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Installing_and_Running_MTASA_Server_on_GNU_Linux&amp;diff=39794</id>
		<title>Installing and Running MTASA Server on GNU Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Installing_and_Running_MTASA_Server_on_GNU_Linux&amp;diff=39794"/>
		<updated>2014-06-09T15:46:31Z</updated>

		<summary type="html">&lt;p&gt;Dpower: /* 64 bit Debian/Ubuntu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation ==&lt;br /&gt;
&lt;br /&gt;
=== Main binary ===&lt;br /&gt;
Download the latest stable Linux binaries from here:&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/135/multitheftauto_linux-{{Current Version|full}}.tar.gz&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
or if you are feeling daring, get the latest nightly build from here:&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://nightly.mtasa.com/?multitheftauto_linux-{{Current Version|full}}-latest&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
Unpack into a directory:&lt;br /&gt;
 tar -xf multitheftauto_linux*&lt;br /&gt;
&lt;br /&gt;
=== Default config ===&lt;br /&gt;
Download the default config files:&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/135/baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack and move into the deathmatch directory:&amp;lt;br/&amp;gt;&lt;br /&gt;
('''''Note:''' Only do this for new installations as it will overwrite any existing config files.)''&lt;br /&gt;
 tar -xf baseconfig*&lt;br /&gt;
 mv baseconfig*/* multitheftauto_linux*/mods/deathmatch&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Default resources ===&lt;br /&gt;
Download the latest default resources:&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://mtasa-resources.googlecode.com/files/mtasa-resources-r959.zip&lt;br /&gt;
(mtasa-resources-r959.zip is an example. Check https://code.google.com/p/mtasa-resources/downloads/list?q=label:Latest for the latest file name)&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Test ===&lt;br /&gt;
You can now test if the server will start correctly, by entering the install directory:&lt;br /&gt;
 cd multitheftauto_linux*&lt;br /&gt;
&lt;br /&gt;
and launching:&lt;br /&gt;
 ./mta-server&lt;br /&gt;
&lt;br /&gt;
== Running with 32 or 64 bit Linux==&lt;br /&gt;
=== Make sure your server libraries and stuff are up to date ===&lt;br /&gt;
On Debian/Ubuntu this is done with:&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
== Running with 32 bit Linux ==&lt;br /&gt;
===32 bit Troubleshooting===&lt;br /&gt;
* If you get a problem with such as &amp;quot;libreadline.so.5: cannot open shared object file: No such file or directory.&amp;quot;, it can be solved on 32 bit Debian/Ubuntu by doing this:&lt;br /&gt;
&lt;br /&gt;
 apt-get install libreadline5&lt;br /&gt;
&lt;br /&gt;
* If you get a problem with such as &amp;quot;libncursesw.so.5 cannot open shared object file: No such file or directory&amp;quot;, it can be solved on 32 bit Debian/Ubuntu by doing this:&lt;br /&gt;
&lt;br /&gt;
 apt-get install libncursesw5&lt;br /&gt;
&lt;br /&gt;
== Running with 64 bit Linux ==&lt;br /&gt;
===Debian 7 (wheezy) 64 bit===&lt;br /&gt;
Before running MTASA Server, use this command line for installation of 32 bit libs :&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 apt-get install lib32ncursesw5 lib32readline5&lt;br /&gt;
&lt;br /&gt;
===Install 32 bit libs for your 64 bit distro===&lt;br /&gt;
For 64 bit Debian 6, this is achieved with:&amp;lt;br/&amp;gt;&lt;br /&gt;
''(Some 64 bit distros have 32 bit libs already installed for you. So this step might not be required)''&lt;br /&gt;
&lt;br /&gt;
 apt-get install ia32-libs&lt;br /&gt;
&lt;br /&gt;
===64 bit Troubleshooting===&lt;br /&gt;
====64 bit Debian/Ubuntu====&lt;br /&gt;
* If you get a problem with such as &amp;quot;libstdc++.so.6: cannot open shared object file: No such file or directory.&amp;quot;, it can be solved on 64 bit Debian/Ubuntu by doing this:&lt;br /&gt;
&lt;br /&gt;
 apt-get install lib32stdc++6&lt;br /&gt;
&lt;br /&gt;
* If you get a problem with such as &amp;quot;libz.so.1: cannot open shared object file: No such file or directory.&amp;quot;, it can be solved on 64 bit Debian/Ubuntu by doing this:&lt;br /&gt;
&lt;br /&gt;
 apt-get install lib32z1&lt;br /&gt;
&lt;br /&gt;
* If you get a problem with such as &amp;quot;libreadline.so.5: cannot open shared object file: No such file or directory.&amp;quot;, it can be solved on 64 bit Debian/Ubuntu by doing this:&lt;br /&gt;
&lt;br /&gt;
 apt-get install lib32readline5&lt;br /&gt;
&lt;br /&gt;
* If you get a problem with such as &amp;quot;libncursesw.so.5 cannot open shared object file: No such file or directory&amp;quot;, it can be solved on 64 bit Debian/Ubuntu by doing this:&lt;br /&gt;
&lt;br /&gt;
 apt-get install lib32ncursesw5&lt;br /&gt;
&lt;br /&gt;
====64 bit CentOS 6====&lt;br /&gt;
* If you get a problem with such as &amp;quot;libreadline.so.5: cannot open shared object file: No such file or directory.&amp;quot;, edit '''''/etc/yum.conf''''' and add this line:&lt;br /&gt;
 multilib_policy=all&lt;br /&gt;
Then issue this command:&lt;br /&gt;
 yum install compat-readline5&lt;br /&gt;
* Further 64 bit solutions can be found [http://forum.mtasa.com/viewtopic.php?f=106&amp;amp;t=35328#p367282 on the forums]&lt;br /&gt;
&lt;br /&gt;
== MySQL Troubleshooting==&lt;br /&gt;
* If you are using the inbuild MySQL functions such as [[dbConnect]] and [[dbQuery]], you will need to have '''libmysqlclient.so.15''' installed.&lt;br /&gt;
* If you can't get '''libmysqlclient.so.15''' installed by conventional means, then try [http://nightly.mtasa.com/files/libmysqlclient.so.15 downloading the file from here] and copying it to your Linux server '''/usr/lib/''' directory.&lt;br /&gt;
&lt;br /&gt;
==Cent OS Troubleshooting==&lt;br /&gt;
* If you are using Cent OS and you get something like /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by xmll.so) this can be resolved by doing downloading the archive [[http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/9/Fedora/i386/os/Packages/libstdc++-4.3.0-8.i386.rpm here]] and unpacking it with the following command:&lt;br /&gt;
&lt;br /&gt;
 rpm2cpio libstdc++-4.3.0-8.i386.rpm | cpio -i --make-directories&lt;br /&gt;
&lt;br /&gt;
== Server crashes ==&lt;br /&gt;
&lt;br /&gt;
If your Linux server crashes, please obtain a backtrace and post a report on our [http://bugs.mtasa.com/ Bug tracker]&lt;br /&gt;
&lt;br /&gt;
====To obtain a backtrace:====&lt;br /&gt;
===Do you have a core dump file in the the MTA server directory?===&lt;br /&gt;
It's usually called 'core', and usually over 100MB, and looks something like this:&lt;br /&gt;
 [[Image:Core.png]]&lt;br /&gt;
====If you have a core dump file in the the MTA server directory:====&lt;br /&gt;
*Install gdb. To install gdb on Debian, use this command:&lt;br /&gt;
 apt-get install gdb&lt;br /&gt;
*And from the MTA install directory do this command&lt;br /&gt;
 gdb mta-server -c core&lt;br /&gt;
*When gdb launches, do this command to get a  module list:&lt;br /&gt;
 i sh&lt;br /&gt;
*And then this command to get a backtrace:&lt;br /&gt;
 bt&lt;br /&gt;
*Save the output&lt;br /&gt;
*(To exit gdb, use the quit command)&lt;br /&gt;
&lt;br /&gt;
====If you do not have a core dump file in the the MTA server directory:====&lt;br /&gt;
*Install gdb. To install gdb on Debian, use this command:&lt;br /&gt;
 apt-get install gdb&lt;br /&gt;
*And from the MTA server directory start the mta-server like this:&lt;br /&gt;
 gdb mta-server -ex &amp;quot;set print thread-events off&amp;quot; --eval-command run&lt;br /&gt;
*Now wait for a crash. (Ignore any weird screen output in the meantime)&lt;br /&gt;
*When a crash occurs, do this command to get a module list:&lt;br /&gt;
 i sh&lt;br /&gt;
*And then this command to get a backtrace:&lt;br /&gt;
 bt&lt;br /&gt;
*Save the output&lt;br /&gt;
*(To exit gdb, use the quit command)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Server freezes''' ==&lt;br /&gt;
&lt;br /&gt;
If your Linux server freezes, please obtain a backtrace with thread information and post a report on our [http://bugs.mtasa.com/ Bug tracker]&lt;br /&gt;
&lt;br /&gt;
====To obtain a backtrace with thread information:====&lt;br /&gt;
*Install gdb. To install gdb on Debian, use this command:&lt;br /&gt;
 apt-get install gdb&lt;br /&gt;
*And from the MTA server directory start the mta-server like this:&lt;br /&gt;
 gdb mta-server -ex &amp;quot;set print thread-events off&amp;quot; --eval-command run&lt;br /&gt;
*Now wait for a freeze. (Ignore any weird screen output in the meantime)&lt;br /&gt;
*When a freeze occurs, press ctrl-c to start gdb&lt;br /&gt;
*Then do this command to get a module list:&lt;br /&gt;
 i sh&lt;br /&gt;
*And then this command to get a backtrace:&lt;br /&gt;
 bt&lt;br /&gt;
*And then this command to get thread information:&lt;br /&gt;
 info threads&lt;br /&gt;
*Save the output&lt;br /&gt;
*(To exit gdb, use the quit command)&lt;/div&gt;</summary>
		<author><name>Dpower</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PregReplace&amp;diff=36356</id>
		<title>PregReplace</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PregReplace&amp;diff=36356"/>
		<updated>2013-06-06T11:04:56Z</updated>

		<summary type="html">&lt;p&gt;Dpower: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
{{New feature/item|4.014|1.4|5106|&lt;br /&gt;
This function performs a regular expression search and replace and returns the replaced string.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string pregReplace ( string subject, string pattern, string replacement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''subject:''' The input [[string]].&lt;br /&gt;
*'''pattern:''' The pattern [[string]] to search for in the input [[string]].&lt;br /&gt;
*'''replacement:''' The replacement [[string]] to replace all matches within the input [[string]].&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the replaced ''[[string]]'', or [[bool]] ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared ( client and server )&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Some examples:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler( 'examples',&lt;br /&gt;
	function( )&lt;br /&gt;
                -- Replace doh with done&lt;br /&gt;
		outputDebugString( pregReplace( 'I doh this, guys.', 'doh', 'done' ) or 'not replaced' ) -- Result: I done this, guys&lt;br /&gt;
                -- Remove all uppercase alphabetic characters&lt;br /&gt;
                outputDebugString( pregReplace( 'AaaBbbZzz', '[A-Z]{1,}', '' ) or 'not replaced' ) -- Result: aabbzz&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;
==Requirements==&lt;br /&gt;
{{Requirements|1.4-9.05106|1.4-9.05106|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility_functions}}&lt;/div&gt;</summary>
		<author><name>Dpower</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PregReplace&amp;diff=36355</id>
		<title>PregReplace</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PregReplace&amp;diff=36355"/>
		<updated>2013-06-06T11:04:21Z</updated>

		<summary type="html">&lt;p&gt;Dpower: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
{{New feature/item|4.014|1.4|5106|&lt;br /&gt;
This function performs a regular expression search and replace on an input string and returns the replaced string.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string pregReplace ( string subject, string pattern, string replacement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''subject:''' The input [[string]].&lt;br /&gt;
*'''pattern:''' The pattern [[string]] to search for in the input [[string]].&lt;br /&gt;
*'''replacement:''' The replacement [[string]] to replace all matches within the input [[string]].&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the replaced ''[[string]]'', or [[bool]] ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared ( client and server )&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Some examples:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler( 'examples',&lt;br /&gt;
	function( )&lt;br /&gt;
                -- Replace doh with done&lt;br /&gt;
		outputDebugString( pregReplace( 'I doh this, guys.', 'doh', 'done' ) or 'not replaced' ) -- Result: I done this, guys&lt;br /&gt;
                -- Remove all uppercase alphabetic characters&lt;br /&gt;
                outputDebugString( pregReplace( 'AaaBbbZzz', '[A-Z]{1,}', '' ) or 'not replaced' ) -- Result: aabbzz&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;
==Requirements==&lt;br /&gt;
{{Requirements|1.4-9.05106|1.4-9.05106|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility_functions}}&lt;/div&gt;</summary>
		<author><name>Dpower</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PregFind&amp;diff=36354</id>
		<title>PregFind</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PregFind&amp;diff=36354"/>
		<updated>2013-06-06T10:52:05Z</updated>

		<summary type="html">&lt;p&gt;Dpower: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
{{New feature/item|4.014|1.4|5106|&lt;br /&gt;
This function stops at the first occurrence of the pattern in the input string and returns the result of the search.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool pregFind ( string subject, string pattern )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''subject:''' The input [[string]]&lt;br /&gt;
*'''pattern:''' The pattern [[string]] to search for in the input [[string]].&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the pattern was found in the input string, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared ( client and server )&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Some examples:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler( 'examples',&lt;br /&gt;
	function( )&lt;br /&gt;
                -- find the first occurrence of 'hello world' in a string&lt;br /&gt;
		outputDebugString( pregFind( 'hello world, hello world, hello world', 'hello world' ) and 'found' or 'not found' ) -- found &lt;br /&gt;
                -- find the first occurrence of an integer in a string&lt;br /&gt;
                outputDebugString( pregFind( '123', '^-{0,1}\\d+$' ) and 'found' or 'not found' ) -- found&lt;br /&gt;
                -- check if the input string consists of at least 3 letters from a to z (both uppercase and lowercase) and does not contain any whitespace characters&lt;br /&gt;
                outputDebugString( pregFind( 'Kenix', '^[a-zA-Z]{3,}$' ) and 'found' or 'not found' ) -- found&lt;br /&gt;
                -- check if the input string matches the format of a role-play name&lt;br /&gt;
                outputDebugString( pregFind( 'Garry_Newman', '([A-Z]{1,1})[a-z]{2,9}_([A-Z]{1,1})[a-z]{2,9}' ) and 'found' or 'not found' ) -- found&lt;br /&gt;
                -- example of a search for non-ASCII characters (i.e. cyrillic) - привет&lt;br /&gt;
                outputDebugString( pregFind( 'Всем привет парни, ещё раз привет :D', 'привет' ) and 'found' or 'not found' ) -- found&lt;br /&gt;
                -- example of a search for a specific sequence of numbers&lt;br /&gt;
                outputDebugString( pregFind( '5, 10', '^([1-9]{1}[0-9]{0,})+(((,\s|,)[1-9]{1}[0-9]{0,}){0,1}){1,1}' ) and 'found' or 'not found' ) -- found&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;
==Requirements==&lt;br /&gt;
{{Requirements|1.4-9.05106|1.4-9.05106|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility_functions}}&lt;/div&gt;</summary>
		<author><name>Dpower</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PregFind&amp;diff=36353</id>
		<title>PregFind</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PregFind&amp;diff=36353"/>
		<updated>2013-06-06T10:50:40Z</updated>

		<summary type="html">&lt;p&gt;Dpower: grammar again&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
{{New feature/item|4.014|1.4|5106|&lt;br /&gt;
This function stops at the first occurrence of the pattern in the input string and returns the result of the search.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool pregFind ( string subject, string pattern )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''subject:''' The input [[string]]&lt;br /&gt;
*'''pattern:''' The pattern [[string]] to search for in the input [[string]].&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the pattern was found in the input string, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared ( client and server )&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Some examples:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler( 'examples',&lt;br /&gt;
	function( )&lt;br /&gt;
                -- find the first occurrence of 'hello world' in a string&lt;br /&gt;
		outputDebugString( pregFind( 'hello world, hello world, hello world', 'hello world' ) and 'found' or 'not found' ) -- found &lt;br /&gt;
                -- find the first occurrence of an integer in a string&lt;br /&gt;
                outputDebugString( pregFind( '123', '^-{0,1}\\d+$' ) and 'found' or 'not found' ) -- found&lt;br /&gt;
                -- check if the input string consists of at least 3 letters from a to z and A-Z and does not contain any whitespace characters&lt;br /&gt;
                outputDebugString( pregFind( 'Kenix', '^[a-zA-Z]{3,}$' ) and 'found' or 'not found' ) -- found&lt;br /&gt;
                -- check if the input string matches the format of a role-play name&lt;br /&gt;
                outputDebugString( pregFind( 'Garry_Newman', '([A-Z]{1,1})[a-z]{2,9}_([A-Z]{1,1})[a-z]{2,9}' ) and 'found' or 'not found' ) -- found&lt;br /&gt;
                -- example of a search for non-ASCII characters (i.e. cyrillic) - привет&lt;br /&gt;
                outputDebugString( pregFind( 'Всем привет парни, ещё раз привет :D', 'привет' ) and 'found' or 'not found' ) -- found&lt;br /&gt;
                -- example of a search for a specific sequence of numbers&lt;br /&gt;
                outputDebugString( pregFind( '5, 10', '^([1-9]{1}[0-9]{0,})+(((,\s|,)[1-9]{1}[0-9]{0,}){0,1}){1,1}' ) and 'found' or 'not found' ) -- found&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;
==Requirements==&lt;br /&gt;
{{Requirements|1.4-9.05106|1.4-9.05106|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility_functions}}&lt;/div&gt;</summary>
		<author><name>Dpower</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PregFind&amp;diff=36352</id>
		<title>PregFind</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PregFind&amp;diff=36352"/>
		<updated>2013-06-06T10:40:43Z</updated>

		<summary type="html">&lt;p&gt;Dpower: /* Syntax */ Grammar?!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
{{New feature/item|4.014|1.4|5106|&lt;br /&gt;
This function find only one match and when match is founded stop working and return a result.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool pregFind ( string subject, string pattern )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''subject:''' The input [[string]]&lt;br /&gt;
*'''pattern:''' The pattern [[string]] to search for in the input [[string]].&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the pattern was found in the input string, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared ( client and server )&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Some examples:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler( 'examples',&lt;br /&gt;
	function( )&lt;br /&gt;
                -- hello word find&lt;br /&gt;
		outputDebugString( pregFind( 'hello world, hello world, hello world', 'hello world' ) and 'found' or 'not found' ) -- found &lt;br /&gt;
                -- integer number find&lt;br /&gt;
                outputDebugString( pregFind( '123', '^-{0,1}\\d+$' ) and 'found' or 'not found' ) -- found&lt;br /&gt;
                -- Login with a-z and A-Z symbols and have more 3 symbols and without any spaces&lt;br /&gt;
                outputDebugString( pregFind( 'Kenix', '^[a-zA-Z]{3,}$' ) and 'found' or 'not found' ) -- found&lt;br /&gt;
                -- RP nickname check&lt;br /&gt;
                outputDebugString( pregFind( 'Garry_Newman', '([A-Z]{1,1})[a-z]{2,9}_([A-Z]{1,1})[a-z]{2,9}' ) and 'found' or 'not found' ) -- found&lt;br /&gt;
                -- Russian hello ( привет ) find&lt;br /&gt;
                outputDebugString( pregFind( 'Всем привет парни, ещё раз привет :D', 'привет' ) and 'found' or 'not found' ) -- found&lt;br /&gt;
                -- Sequence of numbers&lt;br /&gt;
                outputDebugString( pregFind( '5, 10', '^([1-9]{1}[0-9]{0,})+(((,\s|,)[1-9]{1}[0-9]{0,}){0,1}){1,1}' ) and 'found' or 'not found' ) -- found&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;
==Requirements==&lt;br /&gt;
{{Requirements|1.4-9.05106|1.4-9.05106|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility_functions}}&lt;/div&gt;</summary>
		<author><name>Dpower</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawLine&amp;diff=28839</id>
		<title>DxDrawLine</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawLine&amp;diff=28839"/>
		<updated>2011-12-26T19:29:07Z</updated>

		<summary type="html">&lt;p&gt;Dpower: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}} &lt;br /&gt;
This function draws a 2D line across the screen - rendered for '''one''' frame.  This should be used in conjunction with [[onClientRender]] in order to display continuously.&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 dxDrawLine ( int startX, int startY, int endX, int endY, int color, [float width=1, bool postGUI=false] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''startX:''' An integer representing the '''absolute''' start X position of the line, represented by pixels on the screen.&lt;br /&gt;
* '''startY:''' An integer representing the '''absolute''' start Y position of the line, represented by pixels on the screen.&lt;br /&gt;
* '''endX:''' An integer representing the '''absolute''' end X position of the line, represented by pixels on the screen.&lt;br /&gt;
* '''endY:''' An integer representing the '''absolute''' end Y position of the line, represented by pixels on the screen.&lt;br /&gt;
* '''color:''' An integer of the hex color, produced using [[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue).&lt;br /&gt;
&lt;br /&gt;
==Optional Arguments==&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''width:''' The width/thickness of the line &lt;br /&gt;
* '''postGUI:''' A bool representing whether the line should be drawn on top of or behind any ingame GUI (rendered by CEGUI).&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a true if the operation was 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;
Example code for drawing crosshair for Tank.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local width, height = guiGetScreenSize ( )     -- Get player's screen resolution (width and height).&lt;br /&gt;
local centerX, centerY = ( width / 2 ), ( height / 2 )  -- Get x and y co-ordinates of the center of the screen.&lt;br /&gt;
local colGreen = tocolor ( 0, 255, 0, 255 )    -- Get green color.&lt;br /&gt;
&lt;br /&gt;
function create2DLine ( )&lt;br /&gt;
   dxDrawLine ( centerX, centerY - 200, centerX, centerY - 170, colGreen, 1 )              -- Draw vertical crosshair line&lt;br /&gt;
   dxDrawLine ( centerY - 20, centerY - 185, centerX + 20, centerY - 185, colGreen, 1 )    -- Draw horizontal crosshair line&lt;br /&gt;
end  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function HandleTheRendering ( )&lt;br /&gt;
   addEventHandler ( &amp;quot;onClientRender&amp;quot;, root, create2DLine)  -- Keep the line visible with onClientRender event.&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler ( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, HandleTheRendering )&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;
{{Drawing_functions}}&lt;/div&gt;</summary>
		<author><name>Dpower</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawLine&amp;diff=28838</id>
		<title>DxDrawLine</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawLine&amp;diff=28838"/>
		<updated>2011-12-26T19:28:44Z</updated>

		<summary type="html">&lt;p&gt;Dpower: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}} &lt;br /&gt;
This function draws a 2D line across the screen - rendered for '''one''' frame.  This should be used in conjunction with [[onClientRender]] in order to display continuously.&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 dxDrawLine ( int startX, int startY, int endX, int endY, int color, [float width=1, bool postGUI=false] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''startX:''' An integer representing the '''absolute''' start X position of the line, represented by pixels on the screen.&lt;br /&gt;
* '''startY:''' An integer representing the '''absolute''' start Y position of the line, represented by pixels on the screen.&lt;br /&gt;
* '''endX:''' An integer representing the '''absolute''' end X position of the line, represented by pixels on the screen.&lt;br /&gt;
* '''endY:''' An integer representing the '''absolute''' end Y position of the line, represented by pixels on the screen.&lt;br /&gt;
* '''color:''' An integer of the hex color, produced using [[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue).&lt;br /&gt;
&lt;br /&gt;
==Optional Arguments==&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''width:''' The width/thickness of the line &lt;br /&gt;
* '''postGUI:''' A bool representing whether the line should be drawn on top of or behind any ingame GUI (rendered by CEGUI).&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a true if the operation was 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;
Example code for drawing crosshair for Tank.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local width, height = guiGetScreenSize ( )     -- Get player's screen resolution (width and height).&lt;br /&gt;
local centerX, centerY = ( x / 2 ), ( y / 2 )  -- Get x and y co-ordinates of the center of the screen.&lt;br /&gt;
local colGreen = tocolor ( 0, 255, 0, 255 )    -- Get green color.&lt;br /&gt;
&lt;br /&gt;
function create2DLine ( )&lt;br /&gt;
   dxDrawLine ( centerX, centerY - 200, centerX, centerY - 170, colGreen, 1 )              -- Draw vertical crosshair line&lt;br /&gt;
   dxDrawLine ( centerY - 20, centerY - 185, centerX + 20, centerY - 185, colGreen, 1 )    -- Draw horizontal crosshair line&lt;br /&gt;
end  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function HandleTheRendering ( )&lt;br /&gt;
   addEventHandler ( &amp;quot;onClientRender&amp;quot;, root, create2DLine)  -- Keep the line visible with onClientRender event.&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler ( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, HandleTheRendering )&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;
{{Drawing_functions}}&lt;/div&gt;</summary>
		<author><name>Dpower</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawText&amp;diff=28837</id>
		<title>DxDrawText</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawText&amp;diff=28837"/>
		<updated>2011-12-26T19:16:42Z</updated>

		<summary type="html">&lt;p&gt;Dpower: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}} &lt;br /&gt;
&lt;br /&gt;
Draws a string of text on the screen for one frame. In order for the text to stay visible continuously, you need to call this function with the same parameters on each frame update (see [[onClientRender]]).&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 dxDrawText ( string text, int left, int top [, int right=left, int bottom=top, int color=white, &lt;br /&gt;
                  float scale=1, mixed font=&amp;quot;default&amp;quot;, string alignX=&amp;quot;left&amp;quot;, string alignY=&amp;quot;top&amp;quot;,&lt;br /&gt;
                  bool clip=false, bool wordBreak=false, bool postGUI ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''text:''' the text to draw&lt;br /&gt;
*'''left:''' the absolute X coordinate of the top left corner of the text&lt;br /&gt;
*'''top:''' the absolute Y coordinate of the top left corner of the text&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''right:''' the absolute X coordinate of the right side of the text bounding box. Used for text aligning, clipping and word breaking.&lt;br /&gt;
*'''bottom:''' the absolute Y coordinate of the bottom side of the text bounding box. Used for text aligning, clipping and word breaking.&lt;br /&gt;
*'''color:''' the color of the text, a value produced by [[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue).&lt;br /&gt;
*'''scale:''' the size of the text.{{New feature|3.0110|1.1|'''scale:''' can (optionally) be specified as two floats. i.e. '''scaleX, scaleY'''}}&lt;br /&gt;
*'''font:''' Either a custom [[DX font]] element or the name of a built-in DX font:&lt;br /&gt;
{{DxFonts}}&lt;br /&gt;
*'''alignX:''' horizontal alignment of the text within the bounding box. Can be '''&amp;quot;left&amp;quot;''', '''&amp;quot;center&amp;quot;''' or '''&amp;quot;right&amp;quot;'''.&lt;br /&gt;
*'''alignY:''' vertical alignment of the text within the bounding box. Can be '''&amp;quot;top&amp;quot;''', '''&amp;quot;center&amp;quot;''' or '''&amp;quot;bottom&amp;quot;'''.&lt;br /&gt;
*'''clip:''' if set to ''true'', the parts of the text that don't fit within the bounding box will be cut off.&lt;br /&gt;
*'''wordBreak:''' if set to ''true'', the text will wrap to a new line whenever it reaches the right side of the bounding box. If ''false'', the text will always be completely on one line.&lt;br /&gt;
* '''postGUI:''' A bool representing whether the text should be drawn on top of or behind any ingame GUI (rendered by CEGUI).&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 code will add current zone name in the lower left corner of player's screens.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local screenWidth, screenHeight = guiGetScreenSize ( ) -- Get the screen resolution (width and height)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function createText ( )&lt;br /&gt;
    local playerX, playerY, playerZ = getElementPosition ( localPlayer )       -- Get our player's coordinates.&lt;br /&gt;
    local playerZoneName = getZoneName ( playerX, playerY, playerZ )          -- Get name of the zone the player is in.&lt;br /&gt;
&lt;br /&gt;
    -- Draw zone name text's shadow.&lt;br /&gt;
    dxDrawText ( playerZoneName, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, &amp;quot;pricedown&amp;quot; )&lt;br /&gt;
    -- Draw zone name text.&lt;br /&gt;
    dxDrawText ( playerZoneName, 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, &amp;quot;pricedown&amp;quot; ) &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function HandleTheRendering ( )&lt;br /&gt;
    addEventHandler ( &amp;quot;onClientRender&amp;quot;, root, createText ) -- keep the text visible with onClientRender.&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler ( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot, HandleTheRendering )&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;
{{Drawing_functions}}&lt;/div&gt;</summary>
		<author><name>Dpower</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AddBan&amp;diff=28835</id>
		<title>AddBan</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AddBan&amp;diff=28835"/>
		<updated>2011-12-26T19:04:49Z</updated>

		<summary type="html">&lt;p&gt;Dpower: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function will add a ban for the specified IP/username/serial to 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;
ban addBan ( [ string IP, string Username, string Serial, player responsibleElement, string reason, int seconds = 0 ] )         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
'''Note:''' One of the three: IP, Username or Serial have to be specified.&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''IP:''' The IP to be banned. If you don't want to ban by IP, set this to ''nil''.&lt;br /&gt;
'''or'''&lt;br /&gt;
*'''Username:''' The [http://community.mtasa.com/ MTA Community] username to be banned (now obsolete). If you don't want to ban by username, set this to ''nil''.&lt;br /&gt;
'''or'''&lt;br /&gt;
*'''Serial:''' The serial to be banned. If you don't want to ban by serial, set this to ''nil''.&lt;br /&gt;
''' or any combination.'''&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''responsibleElement:''' The element that is responsible for banning the IP/username/serial. This can be a player or the root ([[getRootElement]]()).&lt;br /&gt;
*'''reason:''' The reason the IP/username/serial will be banned from the server.&lt;br /&gt;
*'''seconds:''' The amount of seconds the player will be banned from the server for. This can be 0 for an infinite amount of time.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the IP/username/serial was banned succesfully, ''false'' if invalid arguments are specified.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example bans a player's IP with the reason &amp;quot;Requested&amp;quot; when they type &amp;quot;/ban-me&amp;quot;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function banMe ( source, command ) -- The function header and where source is defined&lt;br /&gt;
	local ipToBan = getPlayerIP ( source ) -- Get the player's IP&lt;br /&gt;
	addBan ( ipToBan, nil, nil, source, &amp;quot;Requested&amp;quot; ) -- Ban him with the reason; Requested&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;ban-me&amp;quot;, banMe ) -- Make it trigger when a player types &amp;quot;/ban-me&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example 2==&lt;br /&gt;
This example add command to ban player serial.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function banSerial( source, command, noob, reason )&lt;br /&gt;
   if ( noob ) then&lt;br /&gt;
      local theNoob = getPlayerFromName( noob )&lt;br /&gt;
      if ( theNoob ) then&lt;br /&gt;
         local theNoobSerial = getPlayerSerial( theNoob )&lt;br /&gt;
         addBan( nil, nil, theNoobSerial, source, reason )&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;ban-serial&amp;quot;, banSerial )&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:addBan]]&lt;/div&gt;</summary>
		<author><name>Dpower</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:Dpower&amp;diff=26408</id>
		<title>User:Dpower</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:Dpower&amp;diff=26408"/>
		<updated>2011-07-28T15:00:29Z</updated>

		<summary type="html">&lt;p&gt;Dpower: Created page with &amp;quot;I am NeO_D-Power. I am a Head Admin and a scripter (PHP/Lua) for [http://www.team-neo.com/ Team NeO's MTA servers].  I plan on contributing to this wiki in future. :-)&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am NeO_D-Power.&lt;br /&gt;
I am a Head Admin and a scripter (PHP/Lua) for [http://www.team-neo.com/ Team NeO's MTA servers].&lt;br /&gt;
&lt;br /&gt;
I plan on contributing to this wiki in future. :-)&lt;/div&gt;</summary>
		<author><name>Dpower</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Building_MTASA_Server_on_GNU_Linux&amp;diff=24512</id>
		<title>Building MTASA Server on GNU Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Building_MTASA_Server_on_GNU_Linux&amp;diff=24512"/>
		<updated>2010-11-10T13:21:19Z</updated>

		<summary type="html">&lt;p&gt;Dpower: /* Preparing your system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Building on GNU/Linux''' ==&lt;br /&gt;
&lt;br /&gt;
== Preparing your system ==&lt;br /&gt;
&lt;br /&gt;
In order to build the Multi Theft Auto dedicated server, you will have to set up your system with the correct libraries and tools. How these are installed depends on your distribution.&lt;br /&gt;
&lt;br /&gt;
Our network module is distributed as a precompiled binary library. The latest version for GNU/Linux can be found on our [http://code.google.com/p/mtasa-blue/downloads/list Downloads page] on Google Code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Debian Linux'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Includes derivative distributions such as Ubuntu.&lt;br /&gt;
&lt;br /&gt;
You will need the necessary build tools, headers and libraries, which are distributed through the following Debian packages (e.g. Debian Lenny):&lt;br /&gt;
&lt;br /&gt;
* '''build-essential:''' contains the necessary tools, headers and libraries to build applications&lt;br /&gt;
* '''automake:''' contains the automake tools&lt;br /&gt;
* '''libtool:''' contains the libtool software required to build libraries&lt;br /&gt;
* '''libcurl3-dev:''' contains the cURL library (version 3 without SSL support)&lt;br /&gt;
* '''libpcre3-dev:''' contains the PCRE library (version 3)&lt;br /&gt;
* '''libsqlite3-dev:''' contains the SQLite library (version 3)&lt;br /&gt;
* '''libreadline5-dev:''' contains the readline library (version 5)&lt;br /&gt;
* '''subversion:''' contains the tortoise client used to check out our code repository&lt;br /&gt;
To install these packages through apt, use the apt-get install &amp;lt;package list&amp;gt; command as in the following example (executed as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;apt-get install build-essential automake libtool libcurl4-openssl-dev libpcre3-dev libsqlite3-dev libreadline5-dev subversion&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Gentoo Linux'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will need the necessary build tools, headers and libraries. Because Gentoo’s portage system is designed to compile any packages on your own system, the necessary build tools will have already been installed. This only leaves you to install the necessary libraries:&lt;br /&gt;
&lt;br /&gt;
* '''sqlite:''' contains the SQLite library&lt;br /&gt;
* '''git:''' contains the client used to check out our code repository&lt;br /&gt;
* '''curl:''' contains the cURL library; to compile with SSL support, apply the net-misc/curl ssl USE flag&lt;br /&gt;
To compile and install these packages through emerge, use the emerge -v &amp;lt;package list&amp;gt; command. The -v option shows additional * * information and can be omitted. (If you want to use any USE flags, prepend emerge with USE=&amp;quot;use flags here&amp;quot;. You can also use the -pv option to verify that you’re using the correct flags.) Refer to the [http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&amp;amp;chap=1 Gentoo Handbook] or manual for more information on emerge.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;emerge -v subversion sqlite&lt;br /&gt;
USE=“net-misc/curl ssl” emerge -v curl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fedora'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will need these packages to be able to successfully compile a MTA server on Fedora: &lt;br /&gt;
* '''glibc-devel:'''&lt;br /&gt;
* '''curl-devel:''' contains the cURL library&lt;br /&gt;
* '''pcre-devel:''' contains the PCRE library&lt;br /&gt;
* '''sqlite3-devel:''' contains the SQLite library&lt;br /&gt;
* '''readline-devel:''' contains the readline library&lt;br /&gt;
* '''lua-devel:''' contains the Lua libraries&lt;br /&gt;
* '''subversion:''' contains the SVN client to check out the source code&lt;br /&gt;
To install these packages through yum, use the yum install &amp;lt;package list&amp;gt; command as in the following example (executed as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;yum install glibc-devel curl-devel pcre-devel sqlite3-devel readline-devel lua-devel subversion&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''A warning for x64'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The MTA:SA server currently cannot be properly compiled in 64-bit mode. Instead, you should compile it in 32-bit mode and run it using 32-bit compatibility mode (use the -m32 flag).&lt;br /&gt;
&lt;br /&gt;
== General instructions ==&lt;br /&gt;
&lt;br /&gt;
'''Downloading the source.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First you need to download the source.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;svn checkout http://mtasa-blue.googlecode.com/svn/trunk/ mtasa-blue&lt;br /&gt;
cd mtasa-blue&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Prepare the sparsehash library'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can skip this step if your distribution’s package manager provides a sparsehash package that you can install.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;cd vendor/sparsehash/current&lt;br /&gt;
autoreconf -fi&lt;br /&gt;
sh ./configure&lt;br /&gt;
make install&lt;br /&gt;
cd ../../..&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compiling the server'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;autoreconf -fi&lt;br /&gt;
./configure&lt;br /&gt;
make install&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your vanilla server will now be compiled and installed into the MTA10_Server/output/ directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Run the server'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Grab the latest net.so from the Downloads page on GitHub and place it in your output directory, install the accounts.xml, mtaserver.conf and acl.xml files into the mods/deathmatch/ directory and grab the latest resources from the [http://code.google.com/p/multitheftauto-resources/ multitheftauto-resources project]. You can then run your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;cd MTA10_Server/output&lt;br /&gt;
./mta-server&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Troubleshooting''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Any errors during the compilation of json-c can be solved by calling autoreconf -fi from the json-c directory.&lt;br /&gt;
&lt;br /&gt;
If you’re getting any unexpected errors while compiling, please check our [http://bugs.mtasa.com/ Bug tracker] or our [irc://irc.multitheftauto.com/ IRC channel]&lt;/div&gt;</summary>
		<author><name>Dpower</name></author>
	</entry>
</feed>