<?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=Milkshake333</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=Milkshake333"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Milkshake333"/>
	<updated>2026-04-26T14:45:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetAccounts&amp;diff=22340</id>
		<title>GetAccounts</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetAccounts&amp;diff=22340"/>
		<updated>2010-01-29T18:21:15Z</updated>

		<summary type="html">&lt;p&gt;Milkshake333: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function returns a table over all the accounts that exist in the server accounts.xml file. &lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table getAccounts ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
A [[table]] over the accounts that exist in the server accounts.xml file. This table might be empty.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function printAmountOfAccounts ( thePlayer )&lt;br /&gt;
    local accountTable = getAccounts () -- return the table over accounts&lt;br /&gt;
    if #accountTable == 0 then -- if the table is empty&lt;br /&gt;
        outputChatBox( &amp;quot;There are no accounts. :(&amp;quot;, thePlayer )&lt;br /&gt;
    else -- table isn't empty&lt;br /&gt;
        outputChatBox( &amp;quot;There are &amp;quot; .. #accountTable .. &amp;quot; accounts in this server!&amp;quot;, thePlayer )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;accountcount&amp;quot;, printAmountOfAccounts ) -- add a command handler for command 'accountcount'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Account functions}}&lt;/div&gt;</summary>
		<author><name>Milkshake333</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetAccounts&amp;diff=22339</id>
		<title>GetAccounts</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetAccounts&amp;diff=22339"/>
		<updated>2010-01-29T18:20:59Z</updated>

		<summary type="html">&lt;p&gt;Milkshake333: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function returns a table over all the accounts that exist in the server accounts.xml file. &lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table getAccounts ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
A [[table]] over the accounts that exist in the server accounts.xml file. This table might be empty.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function printAmountOfAccounts ( thePlayer )&lt;br /&gt;
    local accountTable = getAccounts () -- return the table over accounts&lt;br /&gt;
    if #accountTable == 0 then -- if the table is empty&lt;br /&gt;
        outputChatBox( &amp;quot;There is no accounts. :(&amp;quot;, thePlayer )&lt;br /&gt;
    else -- table isn't empty&lt;br /&gt;
        outputChatBox( &amp;quot;There are &amp;quot; .. #accountTable .. &amp;quot; accounts in this server!&amp;quot;, thePlayer )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler( &amp;quot;accountcount&amp;quot;, printAmountOfAccounts ) -- add a command handler for command 'accountcount'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Account functions}}&lt;/div&gt;</summary>
		<author><name>Milkshake333</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetAccount&amp;diff=22145</id>
		<title>GetAccount</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetAccount&amp;diff=22145"/>
		<updated>2010-01-02T14:42:11Z</updated>

		<summary type="html">&lt;p&gt;Milkshake333: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function returns an account for a specific user. &lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
account getAccount ( string username, [ string password ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''username:''' The username of the account you want to retrieve&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
*'''password:''' The password for the account. If this argument is not specified, you can get the account whatever password it is, otherwise the password must match the account's.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
An ''account'' value or ''false'' if an account matching the username specified (and password, if specified) could not be found.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function retAccount ( username, password ) --both arguements are strings&lt;br /&gt;
    if getAccount( username, password ) then&lt;br /&gt;
        return getAccount( username, password )&lt;br /&gt;
    else&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Account functions}}&lt;br /&gt;
&lt;br /&gt;
[[pl:GetAccount]]&lt;/div&gt;</summary>
		<author><name>Milkshake333</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AddBan&amp;diff=22133</id>
		<title>AddBan</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AddBan&amp;diff=22133"/>
		<updated>2010-01-01T13:10:44Z</updated>

		<summary type="html">&lt;p&gt;Milkshake333: /* Example */&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 username to be banned. 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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Admin functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;br /&gt;
[[ru:addBan]]&lt;/div&gt;</summary>
		<author><name>Milkshake333</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AddBan&amp;diff=22132</id>
		<title>AddBan</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AddBan&amp;diff=22132"/>
		<updated>2010-01-01T13:03:38Z</updated>

		<summary type="html">&lt;p&gt;Milkshake333: /* Example */&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 username to be banned. 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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function banPlayer( thePlayer, theCommand, theTarget, theReason, theSeconds )&lt;br /&gt;
	if theTarget and theReason then&lt;br /&gt;
		local target = getPlayerFromName(theTarget)&lt;br /&gt;
		if target == false then --Check if there is someone online with that name&lt;br /&gt;
			outputChatbox(&amp;quot;There isn't someone online with that name.&amp;quot;, thePlayer)&lt;br /&gt;
			return&lt;br /&gt;
		end&lt;br /&gt;
		if hasObjectPermissionTo( thePlayer, &amp;quot;function.addBan&amp;quot;, false) then&lt;br /&gt;
			--Check if the player has the permission to ban someone&lt;br /&gt;
			if hasObjectPermissionTo( getThisResource(), &amp;quot;function.addBan&amp;quot;, true) then&lt;br /&gt;
				--Check if this resource has the permission to ban a player&lt;br /&gt;
				if theSeconds then&lt;br /&gt;
					--If there is a time specified we use it&lt;br /&gt;
					addBan(theTarget, thePlayer, theReason, tonumber(theSeconds))&lt;br /&gt;
					--We ban the target by it's name.&lt;br /&gt;
				else&lt;br /&gt;
					--If there wasn't a time specified&lt;br /&gt;
					addBan(theTarget, thePlayer, theReason)&lt;br /&gt;
					--Ban him permanent&lt;br /&gt;
				end&lt;br /&gt;
			else&lt;br /&gt;
				--If the resource doesn't have the permission to use addBan&lt;br /&gt;
				outputChatBox(&amp;quot;This resource has not acces to use the addBan function.&amp;quot;, thePlayer)&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			--If the user doesn't have the permission to use addBan&lt;br /&gt;
			outputChatBox(&amp;quot;You do not have the acces to use the addBan function.&amp;quot;, thePlayer)&lt;br /&gt;
		end	&lt;br /&gt;
	else&lt;br /&gt;
		--Tell the syntax to the player	&lt;br /&gt;
		outputChatBox(&amp;quot;Syntax: /ban targetname reason (seconds)&amp;quot;, thePlayer)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;ban&amp;quot;, banPlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Admin functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;br /&gt;
[[ru:addBan]]&lt;/div&gt;</summary>
		<author><name>Milkshake333</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AddBan&amp;diff=22131</id>
		<title>AddBan</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AddBan&amp;diff=22131"/>
		<updated>2010-01-01T12:47:15Z</updated>

		<summary type="html">&lt;p&gt;Milkshake333: /* Example */&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 username to be banned. 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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--Todo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Admin functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;br /&gt;
[[ru:addBan]]&lt;/div&gt;</summary>
		<author><name>Milkshake333</name></author>
	</entry>
</feed>