<?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=Gr0x</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=Gr0x"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Gr0x"/>
	<updated>2026-05-05T22:09:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetBanAdmin&amp;diff=41233</id>
		<title>SetBanAdmin</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetBanAdmin&amp;diff=41233"/>
		<updated>2014-08-08T19:51:37Z</updated>

		<summary type="html">&lt;p&gt;Gr0x: Fixed a typo after adding example.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
{{New items|4.0132|1.4|&lt;br /&gt;
This function sets a new admin for a [[ban]].&lt;br /&gt;
}}&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 setBanAdmin ( ban theBan, string theAdmin )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theBan:''' The [[ban]] you want to change the admin of.&lt;br /&gt;
*'''theAdmin:''' The new admin.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if changed, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example changes the ban admin to the admin's IP (If it's a player), when someone gets banned.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function banHappened(theBan)&lt;br /&gt;
    if getElementType(source) == &amp;quot;player&amp;quot; then&lt;br /&gt;
        local adminIP = getPlayerIP(source)&lt;br /&gt;
        setBanAdmin(theBan,adminIP)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onBan&amp;quot;, getRootElement(), banHappened )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Admin_functions}}&lt;/div&gt;</summary>
		<author><name>Gr0x</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetBanAdmin&amp;diff=41232</id>
		<title>SetBanAdmin</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetBanAdmin&amp;diff=41232"/>
		<updated>2014-08-08T19:50:54Z</updated>

		<summary type="html">&lt;p&gt;Gr0x: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
{{New items|4.0132|1.4|&lt;br /&gt;
This function sets a new admin for a [[ban]].&lt;br /&gt;
}}&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 setBanAdmin ( ban theBan, string theAdmin )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theBan:''' The [[ban]] you want to change the admin of.&lt;br /&gt;
*'''theAdmin:''' The new admin.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if changed, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example changes the ban admin to the admin's IP (If it's a player), if someone gets banned.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function banHappened(theBan)&lt;br /&gt;
    if getElementType(source) == &amp;quot;player&amp;quot; then&lt;br /&gt;
        local adminIP = getPlayerIP(source)&lt;br /&gt;
        setBanAdmin(theBan,adminIP)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onBan&amp;quot;, getRootElement(), banHappened )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Admin_functions}}&lt;/div&gt;</summary>
		<author><name>Gr0x</name></author>
	</entry>
</feed>