<?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=SunArrow</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=SunArrow"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/SunArrow"/>
	<updated>2026-04-21T12:25:18Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto:_Wiki:GetAccountByName&amp;diff=45220</id>
		<title>Multi Theft Auto: Wiki:GetAccountByName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto:_Wiki:GetAccountByName&amp;diff=45220"/>
		<updated>2015-05-21T20:53:44Z</updated>

		<summary type="html">&lt;p&gt;SunArrow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful_Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns account from specific name (if account with that name exists)&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;'''Important Note:''' This is only SERVER-SIDE!&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;account getAccountFromName( string accountname )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''accountName''': The name of the account you want to retrieve&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getAccountFromName(name) &lt;br /&gt;
   for _,account in pairs(getAccounts()) do&lt;br /&gt;
      local accname = getAccountName(account)&lt;br /&gt;
      if accname:find(name) then&lt;br /&gt;
	 return account&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==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 tells you if there is an account with same username as your nickname.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function testFunction(player)&lt;br /&gt;
local text = getPlayerName(player)&lt;br /&gt;
   if getAccountFromName(text) then&lt;br /&gt;
      outputChatBox(&amp;quot;There is an account with same username as your nickname!&amp;quot;,player,255,0,0)&lt;br /&gt;
   else&lt;br /&gt;
      outputChatBox(&amp;quot;Nobody yet used your nickname as account username :)&amp;quot;,player,0,255,0)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;myaccount&amp;quot;,testFunction)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: SunArrow&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>SunArrow</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto:_Wiki:GetAccountByName&amp;diff=45215</id>
		<title>Multi Theft Auto: Wiki:GetAccountByName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto:_Wiki:GetAccountByName&amp;diff=45215"/>
		<updated>2015-05-20T14:27:17Z</updated>

		<summary type="html">&lt;p&gt;SunArrow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful_Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns account from specific name (if account with that name exists)&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;'''Important Note:''' This is only SERVER-SIDE!&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;account getAccountFromName( string accountname )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''accountName''': The name of the account you want to retrieve&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getAccountFromName(name) &lt;br /&gt;
   for _,account in pairs(getAccounts()) do&lt;br /&gt;
      local accname = getAccountName(account)&lt;br /&gt;
      if accname:find(name) then&lt;br /&gt;
	 return account&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==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 tells you if there is an account with same username as your nickname.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function testFunction(player)&lt;br /&gt;
local text = getPlayerName(player)&lt;br /&gt;
   if getAccountFromName(text) then&lt;br /&gt;
      outputChatBox(&amp;quot;There is an account with same username as your nickname!&amp;quot;,player,255,0,0)&lt;br /&gt;
   else&lt;br /&gt;
      outputChatBox(&amp;quot;Nobody yet used your nickname as account username :)&amp;quot;,player,0,255,0)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;myaccount&amp;quot;,testFunction)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: SunArrow&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>SunArrow</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto:_Wiki:GetAccountByName&amp;diff=45214</id>
		<title>Multi Theft Auto: Wiki:GetAccountByName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto:_Wiki:GetAccountByName&amp;diff=45214"/>
		<updated>2015-05-20T14:26:45Z</updated>

		<summary type="html">&lt;p&gt;SunArrow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful_Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns account from specific name (if account with that name exists)&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;'''Important Note:''' This is only SERVER-SIDE!&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;account getAccountFromName( string accountname )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''accountName''': The name of the account you want to retrieve&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getAccountFromName(name) &lt;br /&gt;
   for _,account in pairs(getAccounts()) do&lt;br /&gt;
      local accname = getAccountName(account)&lt;br /&gt;
	  if accname:find(name) then&lt;br /&gt;
	     return account&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==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 tells you if there is an account with same username as your nickname.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function testFunction(player)&lt;br /&gt;
local text = getPlayerName(player)&lt;br /&gt;
   if getAccountFromName(text) then&lt;br /&gt;
      outputChatBox(&amp;quot;There is an account with same username as your nickname!&amp;quot;,player,255,0,0)&lt;br /&gt;
   else&lt;br /&gt;
      outputChatBox(&amp;quot;Nobody yet used your nickname as account username :)&amp;quot;,player,0,255,0)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;myaccount&amp;quot;,testFunction)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: SunArrow&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>SunArrow</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto:_Wiki:GetAccountByName&amp;diff=45213</id>
		<title>Multi Theft Auto: Wiki:GetAccountByName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto:_Wiki:GetAccountByName&amp;diff=45213"/>
		<updated>2015-05-20T14:26:14Z</updated>

		<summary type="html">&lt;p&gt;SunArrow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful_Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns account from specific name (if account with that name exists)&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;'''Important Note:''' This is only SERVER-SIDE!&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;account getAccountFromName( string accountname )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''accountName''': The name of the account you want to retrieve&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getAccountFromName(name) -- made by me (SunArrow) ;3&lt;br /&gt;
   for _,account in pairs(getAccounts()) do&lt;br /&gt;
      local accname = getAccountName(account)&lt;br /&gt;
	  if accname:find(name) then&lt;br /&gt;
	     return account&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==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 tells you if there is an account with same username as your nickname.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function testFunction(player)&lt;br /&gt;
local text = getPlayerName(player)&lt;br /&gt;
   if getAccountFromName(text) then&lt;br /&gt;
      outputChatBox(&amp;quot;There is an account with same username as your nickname!&amp;quot;,player,255,0,0)&lt;br /&gt;
   else&lt;br /&gt;
      outputChatBox(&amp;quot;Nobody yet used your nickname as account username :)&amp;quot;,player,0,255,0)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;myaccount&amp;quot;,testFunction)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: SunArrow&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>SunArrow</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto:_Wiki:GetAccountByName&amp;diff=45212</id>
		<title>Multi Theft Auto: Wiki:GetAccountByName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto:_Wiki:GetAccountByName&amp;diff=45212"/>
		<updated>2015-05-20T14:17:55Z</updated>

		<summary type="html">&lt;p&gt;SunArrow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful_Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns account from specific name (if account with that name exists)&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;'''Important Note:''' This is only SERVER-SIDE!&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;account getAccountFromName( string accountname )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''accountName''': The name of the account you want to retrieve&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getAccountFromName(name)&lt;br /&gt;
   for _,account in pairs(getAccounts()) do&lt;br /&gt;
      if getAccountName(account) == name then&lt;br /&gt;
	 return account&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==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 tells you if there is an account with same username as your nickname.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function testFunction(player)&lt;br /&gt;
local text = getPlayerName(player)&lt;br /&gt;
   if getAccountFromName(text) then&lt;br /&gt;
      outputChatBox(&amp;quot;There is an account with same username as your nickname!&amp;quot;,player,255,0,0)&lt;br /&gt;
   else&lt;br /&gt;
      outputChatBox(&amp;quot;Nobody yet used your nickname as account username :)&amp;quot;,player,0,255,0)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;myaccount&amp;quot;,testFunction)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: SunArrow&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>SunArrow</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto:_Wiki:GetAccountByName&amp;diff=45211</id>
		<title>Multi Theft Auto: Wiki:GetAccountByName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto:_Wiki:GetAccountByName&amp;diff=45211"/>
		<updated>2015-05-20T14:13:49Z</updated>

		<summary type="html">&lt;p&gt;SunArrow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful_Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns account from specific name (if account with that name exists)&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;'''Important Note:''' This is only SERVER-SIDE!&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;account getAccountFromName( string accountname )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''accountName''': The name of the account you want to retrieve&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getAccountFromName(name)&lt;br /&gt;
   for _,account in pairs(getAccounts()) do&lt;br /&gt;
      if getAccountName(account) == name then&lt;br /&gt;
	 return account&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==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 tells you if there is an account with same username as your nickname.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function testFunction(player,cmd,text)&lt;br /&gt;
if not text then outputChatBox(&amp;quot;account name missing!&amp;quot;,player,255,0,0) return end&lt;br /&gt;
   if getAccountFromName(text) then&lt;br /&gt;
      outputChatBox(&amp;quot;There is an account with same username as your nickname!&amp;quot;,player,255,0,0)&lt;br /&gt;
   else&lt;br /&gt;
      outputChatBox(&amp;quot;Nobody yet used your nickname as account username :)&amp;quot;,player,0,255,0)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;myaccount&amp;quot;,testFunction)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: SunArrow&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>SunArrow</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto:_Wiki:GetAccountByName&amp;diff=45210</id>
		<title>Multi Theft Auto: Wiki:GetAccountByName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto:_Wiki:GetAccountByName&amp;diff=45210"/>
		<updated>2015-05-20T14:12:58Z</updated>

		<summary type="html">&lt;p&gt;SunArrow: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful_Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns account from specific name (if account with that name exists)&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;'''Important Note:''' This is only SERVER-SIDE!&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getAccountFromName( string accountname )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''accountName''': The name of the account you want to retrieve&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getAccountFromName(name)&lt;br /&gt;
   for _,account in pairs(getAccounts()) do&lt;br /&gt;
      if getAccountName(account) == name then&lt;br /&gt;
	 return account&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==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 tells you if there is an account with same username as your nickname.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function testFunction(player,cmd,text)&lt;br /&gt;
if not text then outputChatBox(&amp;quot;account name missing!&amp;quot;,player,255,0,0) return end&lt;br /&gt;
   if getAccountFromName(text) then&lt;br /&gt;
      outputChatBox(&amp;quot;There is an account with same username as your nickname!&amp;quot;,player,255,0,0)&lt;br /&gt;
   else&lt;br /&gt;
      outputChatBox(&amp;quot;Nobody yet used your nickname as account username :)&amp;quot;,player,0,255,0)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;myaccount&amp;quot;,testFunction)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: SunArrow&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>SunArrow</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto:_Wiki:GetAccountByName&amp;diff=45209</id>
		<title>Multi Theft Auto: Wiki:GetAccountByName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto:_Wiki:GetAccountByName&amp;diff=45209"/>
		<updated>2015-05-20T14:12:07Z</updated>

		<summary type="html">&lt;p&gt;SunArrow: Created page with &amp;quot;{{Useful_Function}} &amp;lt;lowercasetitle/&amp;gt; __NOTOC__ This function returns account from specific name (if account with that name exists) &amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;'''Important Note:''' This is onl...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful_Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns account from specific name (if account with that name exists)&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;'''Important Note:''' This is only SERVER-SIDE!&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;account getAccountFromName( string accountname )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''accountName''': The name of the account you want to retrieve&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getAccountFromName(name)&lt;br /&gt;
   for _,account in pairs(getAccounts()) do&lt;br /&gt;
      if getAccountName(account) == name then&lt;br /&gt;
	 return account&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==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 tells you if there is an account with same username as your nickname.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function testFunction(player,cmd,text)&lt;br /&gt;
if not text then outputChatBox(&amp;quot;account name missing!&amp;quot;,player,255,0,0) return end&lt;br /&gt;
   if getAccountFromName(text) then&lt;br /&gt;
      outputChatBox(&amp;quot;There is an account with same username as your nickname!&amp;quot;,player,255,0,0)&lt;br /&gt;
   else&lt;br /&gt;
      outputChatBox(&amp;quot;Nobody yet used your nickname as account username :)&amp;quot;,player,0,255,0)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;myaccount&amp;quot;,testFunction)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: SunArrow&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>SunArrow</name></author>
	</entry>
</feed>