<?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=Fuusion</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=Fuusion"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Fuusion"/>
	<updated>2026-04-21T01:39:37Z</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=45224</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=45224"/>
		<updated>2015-05-23T19:44:54Z</updated>

		<summary type="html">&lt;p&gt;Fuusion: Edited the function&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 serverside useful function returns an account from its name, if it does exist.&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;
	return getAccount ( name ) or false&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
Author: SunArrow&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example tells any player who uses ''/checkaccountname'' command if their nickname is used by an account or not.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function outputUsernameAvailability(player)&lt;br /&gt;
    local nick = getPlayerName(player)&lt;br /&gt;
    if getAccountFromName(nick) then&lt;br /&gt;
        outputChatBox(&amp;quot;Your nickname is already used by an account.&amp;quot;,player,255,0,0)&lt;br /&gt;
   else&lt;br /&gt;
      outputChatBox(&amp;quot;Your nickname is free to use by a new account.&amp;quot;,player,0,255,0)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;checkaccountname&amp;quot;,outputUsernameAvailability)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Fuusion</name></author>
	</entry>
</feed>