<?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=Liberty</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=Liberty"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Liberty"/>
	<updated>2026-04-10T22:37:28Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPasswordDifficulty&amp;diff=65712</id>
		<title>GetPasswordDifficulty</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPasswordDifficulty&amp;diff=65712"/>
		<updated>2020-04-07T10:40:03Z</updated>

		<summary type="html">&lt;p&gt;Liberty: &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 checks the password difficulty&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int getPasswordDifficulty ( string password )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''password''': The password whose difficulty you want to check&lt;br /&gt;
&lt;br /&gt;
===Return===&lt;br /&gt;
Returns a value from 1&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getPasswordDifficulty(password)&lt;br /&gt;
    assert(type(password) == &amp;quot;string&amp;quot;, &amp;quot;Bad argument @ getPasswordDifficulty [string expected, got &amp;quot; .. tostring(password) .. &amp;quot;]&amp;quot; )&lt;br /&gt;
    local strong = 0&lt;br /&gt;
    if string.find(password, &amp;quot;[0-9]&amp;quot;) then&lt;br /&gt;
        strong = strong + 1&lt;br /&gt;
    end&lt;br /&gt;
    if string.find(password, &amp;quot;%u&amp;quot;) then&lt;br /&gt;
        strong = strong + 1&lt;br /&gt;
    end&lt;br /&gt;
    return strong&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
After using the command with a password, it returns its difficulty&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function difficulty(commandName, password)&lt;br /&gt;
	if not password then&lt;br /&gt;
        return outputChatBox(&amp;quot;Type password&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    outputChatBox(getPasswordDifficulty(password))&lt;br /&gt;
end    &lt;br /&gt;
addCommandHandler(&amp;quot;difficulty&amp;quot;, difficulty)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: Liberty&lt;/div&gt;</summary>
		<author><name>Liberty</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPasswordDifficulty&amp;diff=65711</id>
		<title>GetPasswordDifficulty</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPasswordDifficulty&amp;diff=65711"/>
		<updated>2020-04-07T09:59:08Z</updated>

		<summary type="html">&lt;p&gt;Liberty: &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 checks the password difficulty&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int getPasswordDifficulty ( string password )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''password''': The password whose difficulty you want to check&lt;br /&gt;
&lt;br /&gt;
===Return===&lt;br /&gt;
Returns a value from 1&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getPasswordDifficulty(password)&lt;br /&gt;
    assert(type(password) == &amp;quot;string&amp;quot;, &amp;quot;Bad argument @ getPasswordDifficulty [string expected, got &amp;quot; .. tostring(password) .. &amp;quot;]&amp;quot; )&lt;br /&gt;
    local strong = 0&lt;br /&gt;
    for i = 0, 9 do&lt;br /&gt;
        if string.find(password, tostring(i)) then&lt;br /&gt;
            strong = strong + 1&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    if string.find(password, &amp;quot;%u&amp;quot;) then&lt;br /&gt;
        strong = strong + 1&lt;br /&gt;
    end&lt;br /&gt;
    return strong&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
After using the command with a password, it returns its difficulty&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function difficulty(commandName, password)&lt;br /&gt;
	if not password then&lt;br /&gt;
        return outputChatBox(&amp;quot;Type password&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    outputChatBox(getPasswordDifficulty(password))&lt;br /&gt;
end    &lt;br /&gt;
addCommandHandler(&amp;quot;difficulty&amp;quot;, difficulty)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: Liberty&lt;/div&gt;</summary>
		<author><name>Liberty</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:GetPasswordDifficulty&amp;diff=65710</id>
		<title>Template:GetPasswordDifficulty</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:GetPasswordDifficulty&amp;diff=65710"/>
		<updated>2020-04-07T09:56:56Z</updated>

		<summary type="html">&lt;p&gt;Liberty: Liberty moved page Template:GetPasswordDifficulty to GetPasswordDifficulty&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[GetPasswordDifficulty]]&lt;/div&gt;</summary>
		<author><name>Liberty</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPasswordDifficulty&amp;diff=65709</id>
		<title>GetPasswordDifficulty</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPasswordDifficulty&amp;diff=65709"/>
		<updated>2020-04-07T09:56:55Z</updated>

		<summary type="html">&lt;p&gt;Liberty: Liberty moved page Template:GetPasswordDifficulty to GetPasswordDifficulty&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 checks the password difficulty&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int getPasswordDifficulty ( string password )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''password''': The password whose difficulty you want to check&lt;br /&gt;
&lt;br /&gt;
===Return===&lt;br /&gt;
Returns a value from 1 to 5&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getPasswordDifficulty(password)&lt;br /&gt;
    assert(type(password) == &amp;quot;string&amp;quot;, &amp;quot;Bad argument @ getPasswordDifficulty [string expected, got &amp;quot; .. tostring(password) .. &amp;quot;]&amp;quot; )&lt;br /&gt;
    local strong = 0&lt;br /&gt;
    for i = 0, 9 do&lt;br /&gt;
        if string.find(password, tostring(i)) then&lt;br /&gt;
            strong = strong + 1&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    if string.find(password, &amp;quot;%u&amp;quot;) then&lt;br /&gt;
        strong = strong + 1&lt;br /&gt;
    end&lt;br /&gt;
    return strong&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
After using the command with a password, it returns its difficulty&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function difficulty(commandName, password)&lt;br /&gt;
	if not password then&lt;br /&gt;
        return outputChatBox(&amp;quot;Type password&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    outputChatBox(getPasswordDifficulty(password))&lt;br /&gt;
end    &lt;br /&gt;
addCommandHandler(&amp;quot;difficulty&amp;quot;, difficulty)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: Liberty&lt;/div&gt;</summary>
		<author><name>Liberty</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPasswordDifficulty&amp;diff=65708</id>
		<title>GetPasswordDifficulty</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPasswordDifficulty&amp;diff=65708"/>
		<updated>2020-04-07T09:56:12Z</updated>

		<summary type="html">&lt;p&gt;Liberty: Created page with &amp;quot;{{Useful Function}} &amp;lt;lowercasetitle/&amp;gt; __NOTOC__ This function checks the password difficulty   ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int getPasswordDifficulty ( string passwo...&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 checks the password difficulty&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int getPasswordDifficulty ( string password )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''password''': The password whose difficulty you want to check&lt;br /&gt;
&lt;br /&gt;
===Return===&lt;br /&gt;
Returns a value from 1 to 5&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getPasswordDifficulty(password)&lt;br /&gt;
    assert(type(password) == &amp;quot;string&amp;quot;, &amp;quot;Bad argument @ getPasswordDifficulty [string expected, got &amp;quot; .. tostring(password) .. &amp;quot;]&amp;quot; )&lt;br /&gt;
    local strong = 0&lt;br /&gt;
    for i = 0, 9 do&lt;br /&gt;
        if string.find(password, tostring(i)) then&lt;br /&gt;
            strong = strong + 1&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    if string.find(password, &amp;quot;%u&amp;quot;) then&lt;br /&gt;
        strong = strong + 1&lt;br /&gt;
    end&lt;br /&gt;
    return strong&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
After using the command with a password, it returns its difficulty&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function difficulty(commandName, password)&lt;br /&gt;
	if not password then&lt;br /&gt;
        return outputChatBox(&amp;quot;Type password&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    outputChatBox(getPasswordDifficulty(password))&lt;br /&gt;
end    &lt;br /&gt;
addCommandHandler(&amp;quot;difficulty&amp;quot;, difficulty)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: Liberty&lt;/div&gt;</summary>
		<author><name>Liberty</name></author>
	</entry>
</feed>