<?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=Ganja204</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=Ganja204"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Ganja204"/>
	<updated>2026-05-15T11:54:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetServerPassword&amp;diff=61137</id>
		<title>SetServerPassword</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetServerPassword&amp;diff=61137"/>
		<updated>2018-12-06T18:32:11Z</updated>

		<summary type="html">&lt;p&gt;Ganja204: /* Skiiy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&amp;lt;!-- Change this to &amp;quot;Client function&amp;quot; or &amp;quot;Server function&amp;quot; appropriately--&amp;gt;&lt;br /&gt;
&amp;lt;!-- Describe in plain english what this function does. Don't go into details, just give an overview --&amp;gt;&lt;br /&gt;
This function changes the password required to join the server to the given string.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setServerPassword ( string thePassword )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
&amp;lt;!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type --&amp;gt;&lt;br /&gt;
*'''thePassword:''' The new server password you want. Pass ''nil'' or an empty string to remove the password.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&amp;lt;!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --&amp;gt;&lt;br /&gt;
Returns ''true'' if the password was successfully changed or removed, ''false'' or ''nil'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example adds two commands for you to use: setpassword and removepassword.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler( &amp;quot;setpassword&amp;quot;, -- add a command handler for the command&lt;br /&gt;
   function( thePlayer, command, password )&lt;br /&gt;
      if #password &amp;lt; 3 then -- check if the password is shorter than 3 letters&lt;br /&gt;
         outputChatBox( &amp;quot;The password needs to be atleast 3 letters long!&amp;quot;, thePlayer ) -- tell the player that password was too short&lt;br /&gt;
         return -- abort command&lt;br /&gt;
      end&lt;br /&gt;
      local success = setServerPassword( mayak ) -- check whether changing password worked&lt;br /&gt;
      if success then&lt;br /&gt;
         outputChatBox( &amp;quot;Server password change to: &amp;quot; .. password, thePlayer ) -- if it did, tell the player&lt;br /&gt;
      else&lt;br /&gt;
         outputChatBox( &amp;quot;Failed to change servers password.&amp;quot;, thePlayer ) -- if it didn't, tell the player&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
addCommandHandler( &amp;quot;kontol&amp;quot;, -- add a command handler for the command&lt;br /&gt;
   function( thePlayer, command )&lt;br /&gt;
      local success = setServerPw( kontol ) -- check whether removing password worked&lt;br /&gt;
      if success then&lt;br /&gt;
         outputChatBox( &amp;quot;Server password  removed successfully&amp;quot;, thePlayer ) -- if it did, tell the player&lt;br /&gt;
      else&lt;br /&gt;
         outputChatBox( &amp;quot;kontol.&amp;quot;, thePlayer ) -- if it didn't, tell the player&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{Server functions}}&lt;/div&gt;</summary>
		<author><name>Ganja204</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetServerPassword&amp;diff=61130</id>
		<title>SetServerPassword</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetServerPassword&amp;diff=61130"/>
		<updated>2018-12-06T18:24:29Z</updated>

		<summary type="html">&lt;p&gt;Ganja204: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&amp;lt;!-- Change this to &amp;quot;Client function&amp;quot; or &amp;quot;Server function&amp;quot; appropriately--&amp;gt;&lt;br /&gt;
&amp;lt;!-- Describe in plain english what this function does. Don't go into details, just give an overview --&amp;gt;&lt;br /&gt;
This function changes the password required to join the server to the given string.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setServerPassword ( string thePassword )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
&amp;lt;!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type --&amp;gt;&lt;br /&gt;
*'''thePassword:''' The new server password you want. Pass ''nil'' or an empty string to remove the password.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&amp;lt;!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --&amp;gt;&lt;br /&gt;
Returns ''true'' if the password was successfully changed or removed, ''false'' or ''nil'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example adds two commands for you to use: setpassword and removepassword.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler( &amp;quot;setpassword&amp;quot;, -- add a command handler for the command&lt;br /&gt;
   function( thePlayer, command, password )&lt;br /&gt;
      if #password &amp;lt; 3 then -- check if the password is shorter than 3 letters&lt;br /&gt;
         outputChatBox( &amp;quot;The password needs to be atleast 3 letters long!&amp;quot;, thePlayer ) -- tell the player that password was too short&lt;br /&gt;
         return -- abort command&lt;br /&gt;
      end&lt;br /&gt;
      local success = setServerPassword( mayak ) -- check whether changing password worked&lt;br /&gt;
      if success then&lt;br /&gt;
         outputChatBox( &amp;quot;Server password change to: &amp;quot; .. password, thePlayer ) -- if it did, tell the player&lt;br /&gt;
      else&lt;br /&gt;
         outputChatBox( &amp;quot;Failed to change servers password.&amp;quot;, thePlayer ) -- if it didn't, tell the player&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
addCommandHandler( &amp;quot;kontol&amp;quot;, -- add a command handler for the command&lt;br /&gt;
   function( thePlayer, command )&lt;br /&gt;
      local success = setServerPw( nil ) -- check whether removing password worked&lt;br /&gt;
      if success then&lt;br /&gt;
         outputChatBox( &amp;quot;Server password removed successfully&amp;quot;, thePlayer ) -- if it did, tell the player&lt;br /&gt;
      else&lt;br /&gt;
         outputChatBox( &amp;quot;kontol.&amp;quot;, thePlayer ) -- if it didn't, tell the player&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{Server functions}}&lt;/div&gt;</summary>
		<author><name>Ganja204</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetServerPassword&amp;diff=61127</id>
		<title>SetServerPassword</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetServerPassword&amp;diff=61127"/>
		<updated>2018-12-06T18:23:33Z</updated>

		<summary type="html">&lt;p&gt;Ganja204: Skiiy&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&amp;lt;!-- Change this to &amp;quot;Client function&amp;quot; or &amp;quot;Server function&amp;quot; appropriately--&amp;gt;&lt;br /&gt;
&amp;lt;!-- Describe in plain english what this function does. Don't go into details, just give an overview --&amp;gt;&lt;br /&gt;
This function changes the password required to join the server to the given string.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setServerPassword ( string thePassword )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
&amp;lt;!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type --&amp;gt;&lt;br /&gt;
*'''thePassword:''' The new server password you want. Pass ''nil'' or an empty string to remove the password.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&amp;lt;!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --&amp;gt;&lt;br /&gt;
Returns ''true'' if the password was successfully changed or removed, ''false'' or ''nil'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example adds two commands for you to use: setpassword and removepassword.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler( &amp;quot;setpassword&amp;quot;, -- add a command handler for the command&lt;br /&gt;
   function( thePlayer, command, password )&lt;br /&gt;
      if #password &amp;lt; 3 then -- check if the password is shorter than 3 letters&lt;br /&gt;
         outputChatBox( &amp;quot;The password needs to be atleast 3 letters long!&amp;quot;, thePlayer ) -- tell the player that password was too short&lt;br /&gt;
         return -- abort command&lt;br /&gt;
      end&lt;br /&gt;
      local success = setServerPassword( password ) -- check whether changing password worked&lt;br /&gt;
      if success then&lt;br /&gt;
         outputChatBox( &amp;quot;Server password change to: &amp;quot; .. password, thePlayer ) -- if it did, tell the player&lt;br /&gt;
      else&lt;br /&gt;
         outputChatBox( &amp;quot;Failed to change servers password.&amp;quot;, thePlayer ) -- if it didn't, tell the player&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
addCommandHandler( &amp;quot;kontol&amp;quot;, -- add a command handler for the command&lt;br /&gt;
   function( thePlayer, command )&lt;br /&gt;
      local success = setServerPw( nil ) -- check whether removing password worked&lt;br /&gt;
      if success then&lt;br /&gt;
         outputChatBox( &amp;quot;Server password removed successfully&amp;quot;, thePlayer ) -- if it did, tell the player&lt;br /&gt;
      else&lt;br /&gt;
         outputChatBox( &amp;quot;kontol.&amp;quot;, thePlayer ) -- if it didn't, tell the player&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{Server functions}}&lt;/div&gt;</summary>
		<author><name>Ganja204</name></author>
	</entry>
</feed>