<?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=VRocker</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=VRocker"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/VRocker"/>
	<updated>2026-04-24T22:47:27Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/irc_onConnecting&amp;diff=15745</id>
		<title>Modules/IRCEcho/irc onConnecting</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/irc_onConnecting&amp;diff=15745"/>
		<updated>2008-02-09T22:39:40Z</updated>

		<summary type="html">&lt;p&gt;VRocker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{ModuleFunction|IRCEcho}}&lt;br /&gt;
This is called when the IRC Module is attempting to connect to a 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;
function irc_onConnecting ( string IP, int Port )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''IP:''' The IP/Hostname of the server you are trying to connect to&lt;br /&gt;
* '''Port:''' The Port of the IRC Server you are trying to connect to&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This script outputs to the server console that it is attempting a connection&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function irc_onConnecting( IP, Port )&lt;br /&gt;
  	outputServerLog( &amp;quot;Connecting to IRC (&amp;quot; .. IP .. &amp;quot;:&amp;quot; .. tostring( Port ) .. &amp;quot;)&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Modules/IRCEcho/Callbacks}}&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/irc_onConnected&amp;diff=15744</id>
		<title>Modules/IRCEcho/irc onConnected</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/irc_onConnected&amp;diff=15744"/>
		<updated>2008-02-09T22:39:12Z</updated>

		<summary type="html">&lt;p&gt;VRocker: New page: __NOTOC__ {{ModuleFunction|IRCEcho}} This is called when the IRC Module has successfully connected to a server  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; function irc_onConnected (  ) &amp;lt;/syntaxhighlight&amp;gt;  ==Example== ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{ModuleFunction|IRCEcho}}&lt;br /&gt;
This is called when the IRC Module has successfully connected to a 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;
function irc_onConnected (  )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This script outputs that the server has connected to IRC&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function irc_onConnected( )&lt;br /&gt;
  	outputServerLog( &amp;quot;IRC Connected!&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Modules/IRCEcho/Callbacks}}&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/irc_onConnecting&amp;diff=15743</id>
		<title>Modules/IRCEcho/irc onConnecting</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/irc_onConnecting&amp;diff=15743"/>
		<updated>2008-02-09T22:36:40Z</updated>

		<summary type="html">&lt;p&gt;VRocker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{ModuleFunction|IRCEcho}}&lt;br /&gt;
This is called when the IRC Module is attempting to connect to a 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;
function irc_onConnecting ( string IP, int Port )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''IP:''' The IP/Hostname of the server you are trying to connect to&lt;br /&gt;
* '''Port:''' The Port of the IRC Server you are trying to connect to&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This script can be used from irc, so people can check their rights&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function irc_onConnecting( IP, Port )&lt;br /&gt;
  	outputServerLog( &amp;quot;Connecting to IRC (&amp;quot; .. IP .. &amp;quot;:&amp;quot; .. tostring( Port ) .. &amp;quot;)&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Modules/IRCEcho/Callbacks}}&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/irc_onConnecting&amp;diff=15742</id>
		<title>Modules/IRCEcho/irc onConnecting</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/irc_onConnecting&amp;diff=15742"/>
		<updated>2008-02-09T22:36:30Z</updated>

		<summary type="html">&lt;p&gt;VRocker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{ModuleFunction|IRCEcho}}&lt;br /&gt;
This is called when the IRC Module is attempting to connect to a 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;
function irc_onConnecting ( string IP, int Port )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''IP:''' The IP/Hostname of the server you are trying to connect to&lt;br /&gt;
* '''Port:''' The Port of the IRC Server you are trying to connect to&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This script can be used from irc, so people can check their rights&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function irc_onConnecting( IP, Port )&lt;br /&gt;
  	outputServerLog( &amp;quot;Connecting to IRC (&amp;quot; .. IP .. &amp;quot;:&amp;quot; .. tostring( Port ) .. &amp;quot;)&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Modules/IRCEcho/Functions}}&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/irc_onConnecting&amp;diff=15741</id>
		<title>Modules/IRCEcho/irc onConnecting</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/irc_onConnecting&amp;diff=15741"/>
		<updated>2008-02-09T22:36:11Z</updated>

		<summary type="html">&lt;p&gt;VRocker: New page: __NOTOC__ {{ModuleFunction|IRCEcho}} This is called when the IRC Module is attempting to connect to a server  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; function irc_onConnecting ( string IP, int Port ) &amp;lt;/c...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{ModuleFunction|IRCEcho}}&lt;br /&gt;
This is called when the IRC Module is attempting to connect to a 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;
function irc_onConnecting ( string IP, int Port )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''IP:''' The IP/Hostname of the server you are trying to connect to&lt;br /&gt;
* '''Port:''' The Port of the IRC Server you are trying to connect to&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This script can be used from irc, so people can check their rights&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function irc_onConnecting( IP, Port )&lt;br /&gt;
  	outputServerLog( &amp;quot;Connecting to IRC (&amp;quot; .. IP .. &amp;quot;:&amp;quot; .. tostring( Port ) .. &amp;quot;)&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho&amp;diff=15740</id>
		<title>Modules/IRCEcho</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho&amp;diff=15740"/>
		<updated>2008-02-09T22:31:31Z</updated>

		<summary type="html">&lt;p&gt;VRocker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Module_Info|&lt;br /&gt;
  name           = MTASA IRC Echo |&lt;br /&gt;
  version        = 2.1 |&lt;br /&gt;
  author         = [[User:VRocker|VRocker]] |&lt;br /&gt;
  module_website = ''Not available'' |&lt;br /&gt;
  download_link  = [http://liberty-unleashed.co.uk/MTA/IRC%20Echo%20Script%20v2.zip Here] |&lt;br /&gt;
  license        = ''Unlicensed'' |&lt;br /&gt;
}}&lt;br /&gt;
MTASA IRC Echo is a module that provides an IRC echo for an MTASA server. It is available for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Windows===&lt;br /&gt;
Uncompress the file ml_ircecho.dll into your ''%PROGRAMFILES%\MTA San Andreas\server\mods\deathmatch\modules\'' directory.&lt;br /&gt;
&lt;br /&gt;
Then, add the following line in mtaserver.conf:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;module file=&amp;quot;ml_ircecho.dll&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
Uncompress the file ml_ircecho.so into your ''%MTASERVER%\mods\deathmatch\modules\'' directory.&lt;br /&gt;
&lt;br /&gt;
Then, add the following line in mtaserver.conf:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;module file=&amp;quot;ml_ircecho.so&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
{{Modules/IRCEcho/Functions}}&lt;br /&gt;
&lt;br /&gt;
==Callbacks==&lt;br /&gt;
{{Modules/IRCEcho/Callbacks}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Modules]]&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/ircOpen&amp;diff=14872</id>
		<title>Modules/IRCEcho/ircOpen</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/ircOpen&amp;diff=14872"/>
		<updated>2008-01-13T15:22:19Z</updated>

		<summary type="html">&lt;p&gt;VRocker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{ModuleFunction|IRCEcho}}&lt;br /&gt;
Opens a connection to the specified IRC 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;
IRCConnection ircOpen ( string hostname, int port, string nick, string channel, [ string password = &amp;quot;&amp;quot;] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''hostname:''' The IRC server to connect to&lt;br /&gt;
* '''port:''' The IRC server port&lt;br /&gt;
* '''nick:''' The nickname you want your bot to connect as&lt;br /&gt;
* '''channel:''' The channel you want the bot to join on connect&lt;br /&gt;
&lt;br /&gt;
===Optional arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''password''': The password to enter the IRC server&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a pointer to the IRC connection if successful, otherwise it returns ''nil''&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example connects to ''irc.gtanet.com'' on port ''6667'' as ''WikiTest'' and joins ''#Channel''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
szChans = {} --Init an array of channels for storage&lt;br /&gt;
&lt;br /&gt;
function onResourceStart( res )&lt;br /&gt;
	if res == getThisResource() then -- If the starting resource is this one&lt;br /&gt;
		ircInit( ) -- Initialize the module for this resource&lt;br /&gt;
		pIRC = ircOpen( &amp;quot;irc.gtanet.com&amp;quot;, 6667, &amp;quot;WikiTest&amp;quot;, &amp;quot;#channel&amp;quot; ) -- Open the IRC connection&lt;br /&gt;
		if pIRC then -- If opening connection was successful&lt;br /&gt;
			szChans[ pIRC ] = &amp;quot;#channel&amp;quot; -- Add the channel to the table&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, getRootElement(), onResourceStart )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Modules/IRCEcho/Functions}}&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/ircInit&amp;diff=14871</id>
		<title>Modules/IRCEcho/ircInit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/ircInit&amp;diff=14871"/>
		<updated>2008-01-13T15:21:50Z</updated>

		<summary type="html">&lt;p&gt;VRocker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{ModuleFunction|IRCEcho}}&lt;br /&gt;
Initializes the module for use in the script. Must be ran in the scripts you want to use with the echo&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function ircInit()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example initializes the module on resource startup&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onResourceStart( res )&lt;br /&gt;
	if ( res == getThisResource () ) then&lt;br /&gt;
		ircInit()&lt;br /&gt;
		outputServerLog( &amp;quot;Initialized IRC for &amp;quot; .. getResourceName( res ) )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, getRootElement(), onResourceStart )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Modules/IRCEcho/Functions}}&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/ircDisconnect&amp;diff=14870</id>
		<title>Modules/IRCEcho/ircDisconnect</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/ircDisconnect&amp;diff=14870"/>
		<updated>2008-01-13T15:21:27Z</updated>

		<summary type="html">&lt;p&gt;VRocker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{ModuleFunction|IRCEcho}}&lt;br /&gt;
Disconnects an open IRC Connection&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function ircDisconnect ( IRCConnection irc )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''irc:''' The IRCConnection you wish to disconnect&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example connects to a server on ''ResourceStart'' and disconnects on ''ResourceStop''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
szChans = {} --Init an array of channels for storage&lt;br /&gt;
&lt;br /&gt;
function onResourceStart( res )&lt;br /&gt;
	if res == getThisResource() then -- If the starting resource is this one&lt;br /&gt;
		ircInit( ) -- Initialize the module for this resource&lt;br /&gt;
		pIRC = ircOpen( &amp;quot;irc.gtanet.com&amp;quot;, 6667, &amp;quot;WikiTest&amp;quot;, &amp;quot;#channel&amp;quot; ) -- Open the IRC connection&lt;br /&gt;
		if pIRC then -- If opening connection was successful&lt;br /&gt;
			szChans[ pIRC ] = &amp;quot;#channel&amp;quot; -- Add the channel to the table&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onResourceStop( res )&lt;br /&gt;
	if res == getThisResource () then -- If the stopping resource is this one&lt;br /&gt;
		if pIRC then -- If theres an IRC Connection&lt;br /&gt;
			ircDisconnect( pIRC ) -- Disconnect the connection&lt;br /&gt;
			szChans[ pIRC ] = nil -- Removes the channel from the array&lt;br /&gt;
			pIRC = nil -- Set the connection to nil&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, getRootElement(), onResourceStart )&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStop&amp;quot;, getRootElement(), onResourceStop )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Modules/IRCEcho/Functions}}&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/ircDisconnect&amp;diff=14859</id>
		<title>Modules/IRCEcho/ircDisconnect</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/ircDisconnect&amp;diff=14859"/>
		<updated>2008-01-13T14:41:35Z</updated>

		<summary type="html">&lt;p&gt;VRocker: New page: __NOTOC__ Disconnects an open IRC Connection  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; function ircDisconnect ( IRCConnection irc ) &amp;lt;/syntaxhighlight&amp;gt; ===Required arguments=== * '''irc:''' The IRCConnection you wish...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Disconnects an open IRC Connection&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function ircDisconnect ( IRCConnection irc )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''irc:''' The IRCConnection you wish to disconnect&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example connects to a server on ''ResourceStart'' and disconnects on ''ResourceStop''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
szChans = {} --Init an array of channels for storage&lt;br /&gt;
&lt;br /&gt;
function onResourceStart( res )&lt;br /&gt;
	if res == getThisResource() then -- If the starting resource is this one&lt;br /&gt;
		ircInit( ) -- Initialize the module for this resource&lt;br /&gt;
		pIRC = ircOpen( &amp;quot;irc.gtanet.com&amp;quot;, 6667, &amp;quot;WikiTest&amp;quot;, &amp;quot;#channel&amp;quot; ) -- Open the IRC connection&lt;br /&gt;
		if pIRC then -- If opening connection was successful&lt;br /&gt;
			szChans[ pIRC ] = &amp;quot;#channel&amp;quot; -- Add the channel to the table&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onResourceStop( res )&lt;br /&gt;
	if res == getThisResource () then -- If the stopping resource is this one&lt;br /&gt;
		if pIRC then -- If theres an IRC Connection&lt;br /&gt;
			ircDisconnect( pIRC ) -- Disconnect the connection&lt;br /&gt;
			szChans[ pIRC ] = nil -- Removes the channel from the array&lt;br /&gt;
			pIRC = nil -- Set the connection to nil&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, getRootElement(), onResourceStart )&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStop&amp;quot;, getRootElement(), onResourceStop )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Modules/IRCEcho/Functions}}&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/ircOpen&amp;diff=14858</id>
		<title>Modules/IRCEcho/ircOpen</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/ircOpen&amp;diff=14858"/>
		<updated>2008-01-13T14:37:53Z</updated>

		<summary type="html">&lt;p&gt;VRocker: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Opens a connection to the specified IRC 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;
IRCConnection ircOpen ( string hostname, int port, string nick, string channel, [ string password = &amp;quot;&amp;quot;] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''hostname:''' The IRC server to connect to&lt;br /&gt;
* '''port:''' The IRC server port&lt;br /&gt;
* '''nick:''' The nickname you want your bot to connect as&lt;br /&gt;
* '''channel:''' The channel you want the bot to join on connect&lt;br /&gt;
&lt;br /&gt;
===Optional arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''password''': The password to enter the IRC server&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a pointer to the IRC connection if successful, otherwise it returns ''nil''&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example connects to ''irc.gtanet.com'' on port ''6667'' as ''WikiTest'' and joins ''#Channel''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
szChans = {} --Init an array of channels for storage&lt;br /&gt;
&lt;br /&gt;
function onResourceStart( res )&lt;br /&gt;
	if res == getThisResource() then -- If the starting resource is this one&lt;br /&gt;
		ircInit( ) -- Initialize the module for this resource&lt;br /&gt;
		pIRC = ircOpen( &amp;quot;irc.gtanet.com&amp;quot;, 6667, &amp;quot;WikiTest&amp;quot;, &amp;quot;#channel&amp;quot; ) -- Open the IRC connection&lt;br /&gt;
		if pIRC then -- If opening connection was successful&lt;br /&gt;
			szChans[ pIRC ] = &amp;quot;#channel&amp;quot; -- Add the channel to the table&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, getRootElement(), onResourceStart )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Modules/IRCEcho/Functions}}&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/ircOpen&amp;diff=14857</id>
		<title>Modules/IRCEcho/ircOpen</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/ircOpen&amp;diff=14857"/>
		<updated>2008-01-13T14:34:52Z</updated>

		<summary type="html">&lt;p&gt;VRocker: New page: __NOTOC__ Opens a connection to the specified IRC Server  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; handler ircOpen ( string hostname, int port, string nick, string channel, [ string password = &amp;quot;&amp;quot;] ) &amp;lt;/cod...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Opens a connection to the specified IRC 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;
handler ircOpen ( string hostname, int port, string nick, string channel, [ string password = &amp;quot;&amp;quot;] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''hostname:''' The IRC server to connect to&lt;br /&gt;
* '''port:''' The IRC server port&lt;br /&gt;
* '''nick:''' The nickname you want your bot to connect as&lt;br /&gt;
* '''channel:''' The channel you want the bot to join on connect&lt;br /&gt;
&lt;br /&gt;
===Optional arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''password''': The password to enter the IRC server&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a pointer to the IRC connection if successful, otherwise it returns ''nil''&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example connects to ''irc.gtanet.com'' on port ''6667'' as ''WikiTest'' and joins ''#Channel''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
szChans = {} --Init an array of channels for storage&lt;br /&gt;
&lt;br /&gt;
function onResourceStart( res )&lt;br /&gt;
	if res == getThisResource() then -- If the starting resource is this one&lt;br /&gt;
		ircInit( ) -- Initialize the module for this resource&lt;br /&gt;
		pIRC = ircOpen( &amp;quot;irc.gtanet.com&amp;quot;, 6667, &amp;quot;WikiTest&amp;quot;, &amp;quot;#channel&amp;quot; ) -- Open the IRC connection&lt;br /&gt;
		if pIRC then -- If opening connection was successful&lt;br /&gt;
			szChans[ pIRC ] = &amp;quot;#channel&amp;quot; -- Add the channel to the table&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, getRootElement(), onResourceStart )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Modules/IRCEcho/Functions}}&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho&amp;diff=14855</id>
		<title>Modules/IRCEcho</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho&amp;diff=14855"/>
		<updated>2008-01-13T14:25:51Z</updated>

		<summary type="html">&lt;p&gt;VRocker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Module_Info|&lt;br /&gt;
  name           = MTASA IRC Echo |&lt;br /&gt;
  version        = 2.0 |&lt;br /&gt;
  author         = [[User:VRocker|VRocker]] |&lt;br /&gt;
  module_website = ''Not available'' |&lt;br /&gt;
  download_link  = [http://liberty-unleashed.co.uk/MTA/IRC%20Echo%20Script%20v2.zip Here] |&lt;br /&gt;
  license        = ''Unlicensed'' |&lt;br /&gt;
}}&lt;br /&gt;
MTASA IRC Echo is a module that provides an IRC echo for an MTASA server. At the moment it is only available for windows but a linux version will be available soon.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Windows===&lt;br /&gt;
Uncompress the file ml_ircecho.dll into your ''%PROGRAMFILES%\MTA San Andreas\server\mods\deathmatch\modules\'' directory.&lt;br /&gt;
&lt;br /&gt;
Then, add the following line in mtaserver.conf:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;module file=&amp;quot;ml_ircecho.dll&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
{{Modules/IRCEcho/Functions}}&lt;br /&gt;
&lt;br /&gt;
==Callbacks==&lt;br /&gt;
{{Modules/IRCEcho/Callbacks}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Modules]]&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/ircInit&amp;diff=14854</id>
		<title>Modules/IRCEcho/ircInit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho/ircInit&amp;diff=14854"/>
		<updated>2008-01-13T14:25:10Z</updated>

		<summary type="html">&lt;p&gt;VRocker: New page: __NOTOC__ Initializes the module for use in the script. Must be ran in the scripts you want to use with the echo  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; function ircInit() &amp;lt;/syntaxhighlight&amp;gt;   ==Example== '''Examp...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Initializes the module for use in the script. Must be ran in the scripts you want to use with the echo&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function ircInit()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example initializes the module on resource startup&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onResourceStart( res )&lt;br /&gt;
	if ( res == getThisResource () ) then&lt;br /&gt;
		ircInit()&lt;br /&gt;
		outputServerLog( &amp;quot;Initialized IRC for &amp;quot; .. getResourceName( res ) )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onResourceStart&amp;quot;, getRootElement(), onResourceStart )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Modules/IRCEcho/Functions}}&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Modules/IRCEcho/Callbacks&amp;diff=14853</id>
		<title>Template:Modules/IRCEcho/Callbacks</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Modules/IRCEcho/Callbacks&amp;diff=14853"/>
		<updated>2008-01-13T14:16:59Z</updated>

		<summary type="html">&lt;p&gt;VRocker: New page: * irc_onConnecting * irc_onConnected * irc_onDisconnected * [[Modules/IRCEch...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Modules/IRCEcho/irc_onConnecting|irc_onConnecting]]&lt;br /&gt;
* [[Modules/IRCEcho/irc_onConnected|irc_onConnected]]&lt;br /&gt;
* [[Modules/IRCEcho/irc_onDisconnected|irc_onDisconnected]]&lt;br /&gt;
* [[Modules/IRCEcho/irc_onFailedConnection|irc_onFailedConnection]]&lt;br /&gt;
* [[Modules/IRCEcho/irc_onPrivMsg|irc_onPrivMsg]]&lt;br /&gt;
* [[Modules/IRCEcho/irc_onNotice|irc_onNotice]]&lt;br /&gt;
* [[Modules/IRCEcho/irc_onJoin|irc_onJoin]]&lt;br /&gt;
* [[Modules/IRCEcho/irc_onPart|irc_onPart]]&lt;br /&gt;
* [[Modules/IRCEcho/irc_onQuit|irc_onQuit]]&lt;br /&gt;
* [[Modules/IRCEcho/irc_onNickChange|irc_onNickChange]]&lt;br /&gt;
* [[Modules/IRCEcho/irc_onRaw|irc_onRaw]]&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Modules/IRCEcho/Functions&amp;diff=14850</id>
		<title>Template:Modules/IRCEcho/Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Modules/IRCEcho/Functions&amp;diff=14850"/>
		<updated>2008-01-13T14:12:52Z</updated>

		<summary type="html">&lt;p&gt;VRocker: New page: * ircInit * ircOpen * ircDisconnect * ircMessage * [[Modules/IRCEch...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Modules/IRCEcho/ircInit|ircInit]]&lt;br /&gt;
* [[Modules/IRCEcho/ircOpen|ircOpen]]&lt;br /&gt;
* [[Modules/IRCEcho/ircDisconnect|ircDisconnect]]&lt;br /&gt;
* [[Modules/IRCEcho/ircMessage|ircMessage]]&lt;br /&gt;
* [[Modules/IRCEcho/ircNotice|ircNotice]]&lt;br /&gt;
* [[Modules/IRCEcho/ircChangeNick|ircChangeNick]]&lt;br /&gt;
* [[Modules/IRCEcho/ircJoin|ircJoin]]&lt;br /&gt;
* [[Modules/IRCEcho/ircPart|ircPart]]&lt;br /&gt;
* [[Modules/IRCEcho/ircRaw|ircRaw]]&lt;br /&gt;
* [[Modules/IRCEcho/ircIsVoice|ircIsVoice]]&lt;br /&gt;
* [[Modules/IRCEcho/ircIsHalfop|ircIsHalfop]]&lt;br /&gt;
* [[Modules/IRCEcho/ircIsOp|ircIsOp]]&lt;br /&gt;
* [[Modules/IRCEcho/ircIsSuper|ircIsSuper]]&lt;br /&gt;
* [[Modules/IRCEcho/ircIsOwner|ircIsOwner]]&lt;br /&gt;
* [[Modules/IRCEcho/ircGetStatus|ircGetStatus]]&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho&amp;diff=14849</id>
		<title>Modules/IRCEcho</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho&amp;diff=14849"/>
		<updated>2008-01-13T14:08:37Z</updated>

		<summary type="html">&lt;p&gt;VRocker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Module_Info|&lt;br /&gt;
  name           = MTASA IRC Echo |&lt;br /&gt;
  version        = 2.0 |&lt;br /&gt;
  author         = [[User:VRocker|VRocker]] |&lt;br /&gt;
  module_website = ''Not available'' |&lt;br /&gt;
  download_link  = [http://liberty-unleashed.co.uk/MTA/IRC%20Echo%20Script%20v2.zip Here] |&lt;br /&gt;
}}&lt;br /&gt;
MTASA IRC Echo is a module that provides an IRC echo for an MTASA server. At the moment it is only available for windows but a linux version will be available soon.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Windows===&lt;br /&gt;
Uncompress the file ml_ircecho.dll into your ''%PROGRAMFILES%\MTA San Andreas\server\mods\deathmatch\modules\'' directory.&lt;br /&gt;
&lt;br /&gt;
Then, add the following line in mtaserver.conf:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;module file=&amp;quot;ml_ircecho.dll&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
{{Modules/IRCEcho/Functions}}&lt;br /&gt;
&lt;br /&gt;
==Callbacks==&lt;br /&gt;
{{Modules/IRCEcho/Callbacks}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Modules]]&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho&amp;diff=14848</id>
		<title>Modules/IRCEcho</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/IRCEcho&amp;diff=14848"/>
		<updated>2008-01-13T14:05:31Z</updated>

		<summary type="html">&lt;p&gt;VRocker: Initial Page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Module_Info|&lt;br /&gt;
  name           = MTASA IRC Echo |&lt;br /&gt;
  version        = 2.0 |&lt;br /&gt;
  author         = [[User:VRocker|VRocker]] |&lt;br /&gt;
  module_website = ''Not available'' |&lt;br /&gt;
  download_link  = [http://liberty-unleashed.co.uk/MTA/IRC%20Echo%20Script%20v2.zip Here] |&lt;br /&gt;
}}&lt;br /&gt;
MTASA IRC Echo is a module that provides an IRC echo for an MTASA server. At the moment it is only available for windows but a linux version will be available soon.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Windows===&lt;br /&gt;
Uncompress the file ml_ircecho.dll into your ''%PROGRAMFILES%\MTA San Andreas\server\mods\deathmatch\modules\'' directory.&lt;br /&gt;
&lt;br /&gt;
Then, add the following line in mtaserver.conf:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;module file=&amp;quot;ml_ircecho.dll&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Handler functions==&lt;br /&gt;
{{Modules/IRCEcho/Handler_functions}}&lt;br /&gt;
&lt;br /&gt;
==Result managing functions==&lt;br /&gt;
{{Modules/IRCEcho/Result_functions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Modules]]&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetResourceState&amp;diff=14594</id>
		<title>GetResourceState</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetResourceState&amp;diff=14594"/>
		<updated>2008-01-07T01:02:53Z</updated>

		<summary type="html">&lt;p&gt;VRocker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;!-- Describe in plain english what this function does. Don't go into details, just give an overview --&amp;gt;&lt;br /&gt;
This function returns the state of a given reesource&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string getResourceState ( resource res ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;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;
*'''res:''' The resource you wish to get the name of.&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;
Returns a string with the resource state in it. &amp;lt;br \&amp;gt;&lt;br /&gt;
- false on fail&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section class=&amp;quot;server&amp;quot; name=&amp;quot;Server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example returns the state of a given resource. Syntax: ''/state &amp;lt;Resource Name&amp;gt;''&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getState( player, command, sz )&lt;br /&gt;
	if sz then&lt;br /&gt;
		local bFound = false&lt;br /&gt;
		local resourceTable = getResources() -- get a table of resources&lt;br /&gt;
	&lt;br /&gt;
		for resourceKey, resourceValue in ipairs( resourceTable ) do&lt;br /&gt;
			-- iterate through the table and output each resource's name&lt;br /&gt;
			local name = getResourceName( resourceValue )&lt;br /&gt;
			if string.lower( name ) == string.lower( sz ) then&lt;br /&gt;
				outputChatBox( &amp;quot;Resource State: &amp;quot; .. name .. &amp;quot; is currently &amp;quot; .. getResourceState( resourceValue ), player, 0, 0, 255 )&lt;br /&gt;
				bFound = true&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	&lt;br /&gt;
		if bFound ~= true then&lt;br /&gt;
			outputChatBox( &amp;quot;Error: No resource found named: &amp;quot; .. sz, player, 255, 0, 0 )&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox( &amp;quot;Error: You did not specify a resource to check&amp;quot;, player, 255, 0, 0 )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler( &amp;quot;state&amp;quot;, getState )&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;
{{Resource functions}}&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetResourceState&amp;diff=14593</id>
		<title>GetResourceState</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetResourceState&amp;diff=14593"/>
		<updated>2008-01-07T00:59:07Z</updated>

		<summary type="html">&lt;p&gt;VRocker: Added a description and example. May need a list of returns&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;!-- Describe in plain english what this function does. Don't go into details, just give an overview --&amp;gt;&lt;br /&gt;
This function returns the state of a given reesource&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string getResourceState ( resource res ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;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;
*'''res:''' The resource you wish to get the name of.&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;
Returns a string with the resource state in it. &amp;lt;br \&amp;gt;&lt;br /&gt;
- false on fail&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section class=&amp;quot;server&amp;quot; name=&amp;quot;Server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example returns the state of a given resource. Syntax: ''/state &amp;lt;Resource Name&amp;gt;''&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getState( player, command, sz )&lt;br /&gt;
	if sz then&lt;br /&gt;
		local bFound = false&lt;br /&gt;
		local resourceTable = getResources() -- get a table of resources&lt;br /&gt;
	&lt;br /&gt;
		for resourceKey, resourceValue in ipairs( resourceTable ) do&lt;br /&gt;
			-- iterate through the table and output each resource's name&lt;br /&gt;
			local name = getResourceName( resourceValue )&lt;br /&gt;
			if string.lower( name ) == string.lower( sz ) then&lt;br /&gt;
				outputChatBox( &amp;quot;Resource State: &amp;quot; .. name .. &amp;quot; is currently &amp;quot; .. getResourceState( resourceValue ), player, 0, 0, 255 )&lt;br /&gt;
				bFound = true&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	&lt;br /&gt;
		if bFound ~= true then&lt;br /&gt;
			outputChatBox( &amp;quot;Error: No resource found named: &amp;quot; .. sz, player, 255, 0, 0 )&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox( &amp;quot;Error: You did not specify a resource to check&amp;quot;, player, 255, 0, 0 )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler( &amp;quot;state&amp;quot;, getState )&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;
{{Resource functions}}&lt;br /&gt;
--[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnBan&amp;diff=14592</id>
		<title>OnBan</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnBan&amp;diff=14592"/>
		<updated>2008-01-07T00:30:53Z</updated>

		<summary type="html">&lt;p&gt;VRocker: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server event}}&lt;br /&gt;
This event is triggered when an IP address or serial is banned from the server.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string theIPOrSerial&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''theIPOrSerial''': The IP address or serial that was banned from the server.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[element]] that was responsible for the banning. If no responsible was specified, the source is the global root element.&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], the requested ban is not performed.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
root = getRootElement()&lt;br /&gt;
&lt;br /&gt;
function announceBan( sz )&lt;br /&gt;
	if getElementType( source ) then --Check if a player banned the IP/Serial&lt;br /&gt;
		outputChatBox( getClientName( source ) .. &amp;quot; banned &amp;quot; .. sz ) --Output to the chatbox saying the player has banned the IP/Serial&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onBan&amp;quot;, root, announceBan ) --Adds the event handler for 'onBan'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Event_functions}}&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnUnban&amp;diff=14591</id>
		<title>OnUnban</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnUnban&amp;diff=14591"/>
		<updated>2008-01-07T00:30:32Z</updated>

		<summary type="html">&lt;p&gt;VRocker: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server event}}&lt;br /&gt;
This event is triggered when an IP address or serial is unbanned from the server.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string theIPOrSerial&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''theIPOrSerial''': The IP address or serial that was unbanned from the server.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[element]] that was responsible for the unbanning. If no responsible was specified, the source is the global root element.&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], the requested unban is not performed.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
root = getRootElement()&lt;br /&gt;
&lt;br /&gt;
function announceUnban( sz )&lt;br /&gt;
	if getElementType( source ) then --Check if a player unbanned the IP/Serial&lt;br /&gt;
		outputChatBox( getClientName( source ) .. &amp;quot; unbanned &amp;quot; .. sz ) --Output to the chatbox saying the player has unbanned the IP/Serial&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onUnban&amp;quot;, root, announceUnban ) --Adds the event handler for 'onUnban'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Event_functions}}&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnUnban&amp;diff=14590</id>
		<title>OnUnban</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnUnban&amp;diff=14590"/>
		<updated>2008-01-07T00:30:14Z</updated>

		<summary type="html">&lt;p&gt;VRocker: Added an example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server event}}&lt;br /&gt;
This event is triggered when an IP address or serial is unbanned from the server.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string theIPOrSerial&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''theIPOrSerial''': The IP address or serial that was unbanned from the server.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[element]] that was responsible for the unbanning. If no responsible was specified, the source is the global root element.&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], the requested unban is not performed.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
root = getRootElement()&lt;br /&gt;
&lt;br /&gt;
function announceUnban( sz )&lt;br /&gt;
	if getElementType( source ) then --Check if a player unbanned the IP/Serial&lt;br /&gt;
		outputChatBox( getClientName( source ) .. &amp;quot; unbanned &amp;quot; .. sz ) --Output to the chatbox saying the player has unbanned the IP/Serial&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onUnban&amp;quot;, root, announceUnban ) --Adds the event handler for 'onUnban'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Event_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnBan&amp;diff=14589</id>
		<title>OnBan</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnBan&amp;diff=14589"/>
		<updated>2008-01-07T00:28:45Z</updated>

		<summary type="html">&lt;p&gt;VRocker: Added a small example announcing the ban&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server event}}&lt;br /&gt;
This event is triggered when an IP address or serial is banned from the server.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string theIPOrSerial&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''theIPOrSerial''': The IP address or serial that was banned from the server.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[element]] that was responsible for the banning. If no responsible was specified, the source is the global root element.&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], the requested ban is not performed.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
root = getRootElement()&lt;br /&gt;
&lt;br /&gt;
function announceBan( sz )&lt;br /&gt;
	if getElementType( source ) then --Check if a player banned the IP/Serial&lt;br /&gt;
		outputChatBox( getClientName( source ) .. &amp;quot; banned &amp;quot; .. sz ) --Output to the chatbox saying the player has banned the IP/Serial&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onBan&amp;quot;, root, announceBan ) --Adds the event handler for 'onBan'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Event_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineLoadTXD&amp;diff=14575</id>
		<title>EngineLoadTXD</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineLoadTXD&amp;diff=14575"/>
		<updated>2008-01-06T16:54:19Z</updated>

		<summary type="html">&lt;p&gt;VRocker: removed enginePreloadModel from the example since it doesn't exist&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function loads a RenderWare Texture Dictionary (TXD) file into GTA. The texture dictionary can then be used to provide textures.&lt;br /&gt;
&lt;br /&gt;
This is a client side function. Be sure to transfer your TXD file by including it in the meta 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;
txd engineLoadTXD ( string txd_file ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''txd_file:''' The relative path to the txd file you want to load&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[TXD]] if the file was loaded, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
'''Example 1:''' This example loads a combination of a custom DFF and TXD file to replace the Euros vehicle in-game. The collisions are embedded inside the DFF file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
outputChatBox ( &amp;quot;&amp;gt; replacing the euros vehicle&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
txd = engineLoadTXD ( &amp;quot;data/euros.txd&amp;quot; )&lt;br /&gt;
engineImportTXD ( txd, 587 )&lt;br /&gt;
dff = engineLoadDFF ( &amp;quot;data/euros.dff&amp;quot;, 587 )&lt;br /&gt;
engineReplaceModel ( dff, 587 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This example loads a combination of custom DFF, TXD and COL files to replace an in-game model of a set of floors.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
outputChatBox ( &amp;quot;&amp;gt; loading floor objects&amp;quot; )&lt;br /&gt;
txd_floors = engineLoadTXD ( &amp;quot;models/office_floors.txd&amp;quot; )&lt;br /&gt;
engineImportTXD ( txd_floors, 3781 )&lt;br /&gt;
col_floors = engineLoadCOL ( &amp;quot;models/office_floors.col&amp;quot; )&lt;br /&gt;
dff_floors = engineLoadDFF ( &amp;quot;models/office_floors.dff&amp;quot;, 0 )&lt;br /&gt;
engineImportCOL ( col_floors, 3781 )&lt;br /&gt;
engineReplaceModel ( dff_floors, 3781 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreateColCircle&amp;diff=14559</id>
		<title>CreateColCircle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreateColCircle&amp;diff=14559"/>
		<updated>2008-01-05T23:27:06Z</updated>

		<summary type="html">&lt;p&gt;VRocker: Fixed the syntax in the example (Removed fZ)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function creates a collision circle. This is a shape that has a position and a radius and infinite height that you can use to detect a player's presence. Events will be triggered when a player enters or leaves it.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
colshape createColCircle ( float fX, float fY, float radius )             &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''fX:''' The collision circle's center point's X axis position&lt;br /&gt;
*'''fY:''' The collision circle's center point's Y axis position&lt;br /&gt;
*'''radius''' The radius of the collision circle&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[colshape]] element if successful, ''false'' if invalid arguments were passed to the function.&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 displays a chat message when a player enters the colshape and allows the colshape to be created using a console function ''set_zone''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
theZone = false&lt;br /&gt;
&lt;br /&gt;
function shapeHit ( thePlayer ) &lt;br /&gt;
    outputChatBox ( getClientName ( thePlayer ) .. &amp;quot; is in the zone!&amp;quot; ) -- display a message in everyone's chat box&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function setZone ( playerSource, commandName, fX, fY )&lt;br /&gt;
    if ( fY and fX ) then -- check we've got all 3 args we need&lt;br /&gt;
        local tempCol = createColCircle ( fX, fY, 10.0 ) -- create a col&lt;br /&gt;
        if ( tempCol == false ) then -- did the col get created successfully?&lt;br /&gt;
            outputConsole ( &amp;quot;Syntax is: set_zone &amp;lt;X&amp;gt; &amp;lt;Y&amp;gt;&amp;quot; ) -- inform the user what the valid syntax is&lt;br /&gt;
        else&lt;br /&gt;
            if ( theZone ~= false ) then -- did we already have a zone?&lt;br /&gt;
                destroyElement ( theZone ) -- if so, destroy it&lt;br /&gt;
            else&lt;br /&gt;
                   addEventHandler ( &amp;quot;onColShapeHit&amp;quot;, theZone, shapeHit ) -- add a handler for the onColShapeHit event&lt;br /&gt;
            end&lt;br /&gt;
            theZone = tempCol -- and store the new zone we've made&lt;br /&gt;
            outputChatBox ( &amp;quot;Zone has moved!&amp;quot; ) -- and tell everyone&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;set_zone&amp;quot;, setZone ) -- add a console function called set_zone that will trigger the function setZone&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;
{{Collision shape functions}}&lt;br /&gt;
[[Category:Needs_More_Examples]]&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreateColCircle&amp;diff=14558</id>
		<title>CreateColCircle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreateColCircle&amp;diff=14558"/>
		<updated>2008-01-05T23:26:43Z</updated>

		<summary type="html">&lt;p&gt;VRocker: Fixed the syntax in the example (Removed fZ)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function creates a collision circle. This is a shape that has a position and a radius and infinite height that you can use to detect a player's presence. Events will be triggered when a player enters or leaves it.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
colshape createColCircle ( float fX, float fY, float radius )             &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''fX:''' The collision circle's center point's X axis position&lt;br /&gt;
*'''fY:''' The collision circle's center point's Y axis position&lt;br /&gt;
*'''radius''' The radius of the collision circle&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[colshape]] element if successful, ''false'' if invalid arguments were passed to the function.&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 displays a chat message when a player enters the colshape and allows the colshape to be created using a console function ''set_zone''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
theZone = false&lt;br /&gt;
&lt;br /&gt;
function shapeHit ( thePlayer ) &lt;br /&gt;
    outputChatBox ( getClientName ( thePlayer ) .. &amp;quot; is in the zone!&amp;quot; ) -- display a message in everyone's chat box&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function setZone ( playerSource, commandName, fX, fY, fZ )&lt;br /&gt;
    if ( fZ and fY and fX ) then -- check we've got all 3 args we need&lt;br /&gt;
        local tempCol = createColCircle ( fX, fY, 10.0 ) -- create a col&lt;br /&gt;
        if ( tempCol == false ) then -- did the col get created successfully?&lt;br /&gt;
            outputConsole ( &amp;quot;Syntax is: set_zone &amp;lt;X&amp;gt; &amp;lt;Y&amp;gt; &amp;lt;Z&amp;gt;&amp;quot; ) -- inform the user what the valid syntax is&lt;br /&gt;
        else&lt;br /&gt;
            if ( theZone ~= false ) then -- did we already have a zone?&lt;br /&gt;
                destroyElement ( theZone ) -- if so, destroy it&lt;br /&gt;
            else&lt;br /&gt;
                   addEventHandler ( &amp;quot;onColShapeHit&amp;quot;, theZone, shapeHit ) -- add a handler for the onColShapeHit event&lt;br /&gt;
            end&lt;br /&gt;
            theZone = tempCol -- and store the new zone we've made&lt;br /&gt;
            outputChatBox ( &amp;quot;Zone has moved!&amp;quot; ) -- and tell everyone&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;set_zone&amp;quot;, setZone ) -- add a console function called set_zone that will trigger the function setZone&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;
{{Collision shape functions}}&lt;br /&gt;
[[Category:Needs_More_Examples]]&lt;/div&gt;</summary>
		<author><name>VRocker</name></author>
	</entry>
</feed>