<?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=AliAssassiN</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=AliAssassiN"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/AliAssassiN"/>
	<updated>2026-04-28T08:50:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPlayerDiscordJoinParams&amp;diff=64235</id>
		<title>SetPlayerDiscordJoinParams</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPlayerDiscordJoinParams&amp;diff=64235"/>
		<updated>2019-09-10T07:36:36Z</updated>

		<summary type="html">&lt;p&gt;AliAssassiN: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0160|1.6|7485|This function allows you to set a user's Discord join/invite parameters.&lt;br /&gt;
It's necessary to use this function to enable that option on Discord.}}&lt;br /&gt;
&lt;br /&gt;
Use empty string for '''key''' parameter to disable join/invite feature.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setPlayerDiscordJoinParams ( element thePlayer, string key, string partyId, int partyCurrentSize, int partyMaxSize )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[player]]:setDiscordJoinParams}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' The [[player]] whose discord join parameters will be set on.&lt;br /&gt;
*'''key:''' The key which will be called upon invited users (or users who joined the game by clicking &amp;quot;Join&amp;quot;) onPlayerJoin event. (Limited to 64 characters, must not contain space character)&lt;br /&gt;
*'''partyId:''' Changing the partyId is useful to make invites expire. (Limited to 64 characters, must not contain space character)&lt;br /&gt;
*'''partyCurrentSize:''' The current number of used capacity for other users to join. (Can't be more than partyMaxSize)&lt;br /&gt;
*'''partyMaxSize:''' The total capacity for users inside the party.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the value was set successfully, ''false'' otherwise.&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function makeSomeParty ( playerSource, cmdName )&lt;br /&gt;
    setPlayerDiscordJoinParams(playerSource, &amp;quot;abcdefghijklmnopqrstuvwxyz&amp;quot;, &amp;quot;abc123456&amp;quot;, 1, 5)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler ( &amp;quot;makeParty&amp;quot;, makeSomeParty )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Player_functions}}&lt;/div&gt;</summary>
		<author><name>AliAssassiN</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPlayerDiscordJoin&amp;diff=63400</id>
		<title>OnPlayerDiscordJoin</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPlayerDiscordJoin&amp;diff=63400"/>
		<updated>2019-07-24T20:41:29Z</updated>

		<summary type="html">&lt;p&gt;AliAssassiN: Created page with &amp;quot;__NOTOC__ {{Server event}}  {{New feature/item|3.0160|1.6|7485|This event is triggered when a player accepts game invites from a user in discord or click on &amp;quot;Join&amp;quot; button from...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server event}}&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|3.0160|1.6|7485|This event is triggered when a player accepts game invites from a user in discord or click on &amp;quot;Join&amp;quot; button from that player.}}&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool justConnected, string key&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''justConnected''': If true, player connected to the server using game invite, otherwise he's already in the game and not joined the server using discord invite.&lt;br /&gt;
*'''key''': The key passed by setPlayerDiscordJoinParams to the player who invited this user.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the player who is invited to the game/clicked the &amp;quot;Join&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example will announce the server that who invited that user from discord.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function discordJoin(justConnected, key)&lt;br /&gt;
    local myName = getPlayerName(source)&lt;br /&gt;
    if justConnected == true then&lt;br /&gt;
        outputChatBox ( myName .. &amp;quot; been referred here by &amp;quot; .. key )&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox ( myName .. &amp;quot; wanna play with &amp;quot; .. key )&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local refer = getPlayerFromName(key)&lt;br /&gt;
    setElementData(refer, &amp;quot;myUsers&amp;quot;, getElementData(refer, &amp;quot;myUsers&amp;quot;) + 1)&lt;br /&gt;
    setPlayerDiscordJoinParams(refer, key, key, getElementData(refer, &amp;quot;myUsers&amp;quot;), 5)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerDiscordJoin&amp;quot;, getRootElement(), discordJoin)&lt;br /&gt;
&lt;br /&gt;
function storeDiscordParams()&lt;br /&gt;
    local myName = getPlayerName(source)&lt;br /&gt;
    setPlayerDiscordJoinParams(source, myName, myName, 1, 5)&lt;br /&gt;
    setElementData(source, &amp;quot;myUsers&amp;quot;, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, getRootElement(), storeDiscordParams)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{See also/Server event|Player events}}&lt;/div&gt;</summary>
		<author><name>AliAssassiN</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPlayerDiscordJoinParams&amp;diff=63399</id>
		<title>SetPlayerDiscordJoinParams</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPlayerDiscordJoinParams&amp;diff=63399"/>
		<updated>2019-07-24T19:48:45Z</updated>

		<summary type="html">&lt;p&gt;AliAssassiN: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0160|1.6|7485|This function allows you to set a user's Discord join/invite parameters.&lt;br /&gt;
It's necessary to use this function to enable that option on Discord.}}&lt;br /&gt;
&lt;br /&gt;
Use empty string for '''key''' parameter to disable join/invite feature.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setPlayerDiscordJoinParams ( element thePlayer, string key, string partyId, int partyCurrentSize, int partyMaxSize )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[player]]:setDiscordJoinParams}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' The [[player]] whose discord join parameters will be set on.&lt;br /&gt;
*'''key:''' The key which will be called upon invited users (or users who joined the game by clicking &amp;quot;Join&amp;quot;) onPlayerJoin event. (Limited to 64 characters)&lt;br /&gt;
*'''partyId:''' Changing the partyId is useful to make invites expire. (Limited to 64 characters)&lt;br /&gt;
*'''partyCurrentSize:''' The current number of used capacity for other users to join. (Can't be more than partyMaxSize)&lt;br /&gt;
*'''partyMaxSize:''' The total capacity for users inside the party.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the value was set successfully, ''false'' otherwise.&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function makeSomeParty ( playerSource, cmdName )&lt;br /&gt;
    setPlayerDiscordJoinParams(playerSource, &amp;quot;abcdefghijklmnopqrstuvwxyz&amp;quot;, &amp;quot;abc123456&amp;quot;, 1, 5)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler ( &amp;quot;makeParty&amp;quot;, makeSomeParty )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Player_functions}}&lt;/div&gt;</summary>
		<author><name>AliAssassiN</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPlayerDiscordJoinParams&amp;diff=63384</id>
		<title>SetPlayerDiscordJoinParams</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPlayerDiscordJoinParams&amp;diff=63384"/>
		<updated>2019-07-22T20:54:36Z</updated>

		<summary type="html">&lt;p&gt;AliAssassiN: Created page with &amp;quot;{{Server function}} __NOTOC__  This function allows you to set a user's Discord join/invite parameters. It's necessary to use this function to enable that option on Discord....&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function allows you to set a user's Discord join/invite parameters.&lt;br /&gt;
It's necessary to use this function to enable that option on Discord.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setPlayerDiscordJoinParams ( element thePlayer, string key, string partyId, int partyCurrentSize, int partyMaxSize )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[player]]:setDiscordJoinParams}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' The [[player]] whose discord join parameters will be set on.&lt;br /&gt;
*'''key:''' The key which will be called upon invited users (or users who joined the game by clicking &amp;quot;Join&amp;quot;) onPlayerJoin event. (Limited to &amp;gt;=5 and &amp;lt;=64 characters)&lt;br /&gt;
*'''partyId:''' Changing the partyId is useful to make invites expire. (Limited to &amp;gt;=5 and &amp;lt;=64 characters)&lt;br /&gt;
*'''partyCurrentSize:''' The current number of used capacity for other users to join. (Can't be more than partyMaxSize)&lt;br /&gt;
*'''partyMaxSize:''' The total capacity for users inside the party.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the value was set successfully, ''false'' otherwise.&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function makeSomeParty ( playerSource, cmdName )&lt;br /&gt;
    setPlayerDiscordJoinParams(playerSource, &amp;quot;abcdefghijklmnopqrstuvwxyz&amp;quot;, &amp;quot;abc123456&amp;quot;, 1, 5)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler ( &amp;quot;makeParty&amp;quot;, makeSomeParty )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Player_functions}}&lt;/div&gt;</summary>
		<author><name>AliAssassiN</name></author>
	</entry>
</feed>