<?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=Znajder</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=Znajder"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Znajder"/>
	<updated>2026-05-05T11:48:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetDiscordRichPresenceUserID&amp;diff=78650</id>
		<title>GetDiscordRichPresenceUserID</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetDiscordRichPresenceUserID&amp;diff=78650"/>
		<updated>2023-12-10T12:47:26Z</updated>

		<summary type="html">&lt;p&gt;Znajder: Created page with &amp;quot;__NOTOC__  {{Client function}} {{Important Note|The function will correctly display the UserID when the user has given consent and successfully connected to the Rich Presence application.}} {{New feature/item|3.0161|1.6.0|22329| The function returns the client Discord UserID. }}  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; string getDiscordRichPresenceUserID() &amp;lt;/syntaxhighlight&amp;gt;   ===Returns=== It will return an ''empty string (&amp;quot;&amp;quot;)'' if the user has not given consent or has...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Important Note|The function will correctly display the UserID when the user has given consent and successfully connected to the Rich Presence application.}}&lt;br /&gt;
{{New feature/item|3.0161|1.6.0|22329|&lt;br /&gt;
The function returns the client Discord UserID.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string getDiscordRichPresenceUserID()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
It will return an ''empty string (&amp;quot;&amp;quot;)'' if the user has not given consent or has disabled the Rich Presence synchronization option. Otherwise, it will return the ''userid'' as a string.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example displays the user's userid in the chat when they have granted permission to share data. Otherwise, they will receive an appropriate message.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;getmyuserid&amp;quot;,&lt;br /&gt;
    function ()&lt;br /&gt;
        if isDiscordRichPresenceConnected() then&lt;br /&gt;
            local id = getDiscordRichPresenceUserID() &lt;br /&gt;
            if id == &amp;quot;&amp;quot; then &lt;br /&gt;
                outputChatBox(&amp;quot;You didn't allow consent to share data! Grant permission in the settings!&amp;quot;)&lt;br /&gt;
            else &lt;br /&gt;
                outputChatBox(&amp;quot;Yours userid: &amp;quot;..id)&lt;br /&gt;
            end &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;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:isDiscordRichPresenceConnected]]&lt;br /&gt;
[[de:isDiscordRichPresenceConnected]]&lt;br /&gt;
[[hu:isDiscordRichPresenceConnected]]&lt;br /&gt;
[[pl:isDiscordRichPresenceConnected]]&lt;br /&gt;
[[ro:isDiscordRichPresenceConnected]]&lt;br /&gt;
[[ru:IsDiscordRichPresenceConnected]]&lt;br /&gt;
[[PT-BR:IsDiscordRichPresenceConnected]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Client_Discord_functions&amp;diff=78649</id>
		<title>Template:Client Discord functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Client_Discord_functions&amp;diff=78649"/>
		<updated>2023-12-10T12:37:33Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{New items|3.0161|1.6.0|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[isDiscordRichPresenceConnected]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[resetDiscordRichPresenceData]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordApplicationID]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceAsset]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceButton]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceDetails]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceSmallAsset]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceState]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
|22270}}&lt;br /&gt;
&lt;br /&gt;
{{New items|3.0161|1.6.0|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresencePartySize]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceStartTime]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceEndTime]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
|22276}}&lt;br /&gt;
&lt;br /&gt;
{{New items|3.0161|1.6.0|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[getDiscordRichPresenceUserID]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
|22329}}&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Functions templates]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceEndTime&amp;diff=78351</id>
		<title>SetDiscordRichPresenceEndTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceEndTime&amp;diff=78351"/>
		<updated>2023-10-24T18:52:49Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Important Note|To use this function, you must set up your own application [[setDiscordApplicationID]]}}&lt;br /&gt;
{{New feature/item|3.0161|1.6.0|22276|&lt;br /&gt;
This function sets the remaining time of Discord Rich Presence.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceEndTime(int seconds)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setEndTime}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''seconds''': an integer representing the number of seconds that are remaining. If 0, or lower than the start time ([[setDiscordRichPresenceStartTime]]) the timer will not be displayed.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example shows how to change the remaining timer of the Discord Rich Presence application.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_id = &amp;quot;YOUR_APPLICATION_ID&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_id) then &lt;br /&gt;
    setDiscordRichPresenceState(&amp;quot;In-game&amp;quot;)&lt;br /&gt;
    setDiscordRichPresenceStartTime(1)&lt;br /&gt;
    setDiscordRichPresenceEndTime(60) -- 1 minute Remaining&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[de:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[hu:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[pl:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[ro:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceDetails]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceDetails]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceEndTime&amp;diff=78328</id>
		<title>SetDiscordRichPresenceEndTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceEndTime&amp;diff=78328"/>
		<updated>2023-10-24T05:23:32Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Important Note|To use this function, you must set up your own application [[setDiscordApplicationID]]}}&lt;br /&gt;
{{New feature/item|3.0161|1.6.0|22276|&lt;br /&gt;
This function sets the remaining time of Discord Rich Presence.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceEndTime(int seconds)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setEndTime}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''seconds''': an integer representing the number of seconds that are remaining. If 0, or lower than the start time ([[setDiscordRichPresenceStartTime]]) the timer will not be displayed.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example shows how to change the remaining timer of the Discord Rich Presence application.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    setDiscordRichPresenceState(&amp;quot;In-game&amp;quot;)&lt;br /&gt;
    setDiscordRichPresenceStartTime(60)&lt;br /&gt;
    setDiscordRichPresenceEndTime(60)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[de:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[hu:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[pl:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[ro:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceDetails]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceDetails]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceStartTime&amp;diff=78327</id>
		<title>SetDiscordRichPresenceStartTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceStartTime&amp;diff=78327"/>
		<updated>2023-10-24T05:23:04Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Important Note|To use this function, you must set up your own application [[setDiscordApplicationID]]}}&lt;br /&gt;
{{New feature/item|3.0161|1.6.0|22276|&lt;br /&gt;
This function sets the elapsed time of Discord Rich Presence.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceStartTime(int seconds)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setStartTime}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''seconds''': an integer representing the number of seconds that has elapsed. If 0, the timer will not be displayed.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example shows how to change the elapsed timer of the Discord Rich Presence application.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    setDiscordRichPresenceState(&amp;quot;In-game&amp;quot;)&lt;br /&gt;
    setDiscordRichPresenceStartTime(1)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[de:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[hu:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[pl:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[ro:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceDetails]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceDetails]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresencePartySize&amp;diff=78326</id>
		<title>SetDiscordRichPresencePartySize</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresencePartySize&amp;diff=78326"/>
		<updated>2023-10-24T05:22:37Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Important Note|To use this function, you must set up your own application [[setDiscordApplicationID]]}}&lt;br /&gt;
{{Note|For the party size to be displayed, the state must be set [[setDiscordRichPresenceState]]}}&lt;br /&gt;
{{New feature/item|3.0161|1.6.0|22276|&lt;br /&gt;
This function sets the party size of Discord Rich Presence.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresencePartySize(int size, int max)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setPartySize}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''size''': an integer representing the current party size.&lt;br /&gt;
*'''max''': an integer representing the maximum party size.&lt;br /&gt;
&lt;br /&gt;
'''If both values are 0, the party size will not be displayed'''&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example shows how to change the party size of the Discord Rich Presence application.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    setDiscordRichPresenceState(&amp;quot;In-game&amp;quot;)&lt;br /&gt;
    setDiscordRichPresencePartySize(1, 32)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[de:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[hu:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[pl:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[ro:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceDetails]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceDetails]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Client_Discord_functions&amp;diff=78325</id>
		<title>Template:Client Discord functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Client_Discord_functions&amp;diff=78325"/>
		<updated>2023-10-24T05:21:41Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{New items|3.0161|1.6.0|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[isDiscordRichPresenceConnected]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[resetDiscordRichPresenceData]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordApplicationID]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceAsset]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceButton]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceDetails]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceSmallAsset]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceState]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
|22270}}&lt;br /&gt;
&lt;br /&gt;
{{New items|3.0161|1.6.0|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresencePartySize]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceStartTime]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceEndTime]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Functions templates]]&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
|22276}}&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Client_Discord_functions&amp;diff=78216</id>
		<title>Template:Client Discord functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Client_Discord_functions&amp;diff=78216"/>
		<updated>2023-10-12T20:16:05Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{New items|3.0161|1.6.0|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[isDiscordRichPresenceConnected]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[resetDiscordRichPresenceData]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordApplicationID]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceAsset]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceButton]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceDetails]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceSmallAsset]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceState]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
|22270}}&lt;br /&gt;
&lt;br /&gt;
{{New items|3.0161|1.6.0|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresencePartySize]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceStartTime]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceEndTime]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Functions templates]]&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
|22271}}&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceButton&amp;diff=78197</id>
		<title>SetDiscordRichPresenceButton</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceButton&amp;diff=78197"/>
		<updated>2023-10-11T19:12:04Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Important Note|To use this function, you must set up your own application [[setDiscordApplicationID]]}}&lt;br /&gt;
{{New feature/item|3.0162|1.6.0|22269|&lt;br /&gt;
The function sets a custom button through which we can access the website on Discord.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceButton(int index, string text, string url)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setButton}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''index''': a int representing the index of the button (possible values: 1 or 2)&lt;br /&gt;
*'''text''': a string containing the title of the button&lt;br /&gt;
*'''url''': a string containing the button URL (only works with '''https://''' or '''mtasa://''')&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example creates two custom buttons in our Discord Rich Presence application.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    setDiscordRichPresenceButton(1, &amp;quot;Connect to server&amp;quot;, &amp;quot;mtasa://youraddressip&amp;quot;)&lt;br /&gt;
    setDiscordRichPresenceButton(2, &amp;quot;MTA Homepage&amp;quot;, &amp;quot;https://mtasa.com&amp;quot;)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceButton]]&lt;br /&gt;
[[de:setDiscordRichPresenceButton]]&lt;br /&gt;
[[hu:setDiscordRichPresenceButton]]&lt;br /&gt;
[[pl:setDiscordRichPresenceButton]]&lt;br /&gt;
[[ro:setDiscordRichPresenceButton]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceButton]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceButton]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordApplicationID&amp;diff=78186</id>
		<title>SetDiscordApplicationID</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordApplicationID&amp;diff=78186"/>
		<updated>2023-10-10T20:23:15Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Important Note|To reset, please use [[resetDiscordRichPresenceData]]}}&lt;br /&gt;
{{Important Note|In order for the function to work correctly, each must set in the discord -&amp;gt; settings -&amp;gt; activity privacy -&amp;gt; activity status to on.}}&lt;br /&gt;
The function can assign your own application to use in Rich Presence.&lt;br /&gt;
You can create own '''[https://discord.com/developers/applications here]'''&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordApplicationID(string applicationKey)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setApplication}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''applicationKey''': a string represent key your's Application on Discord.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints out if the application was successfully set up and set custom asset image.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    setDiscordRichPresenceAsset(&amp;quot;asset_name_from_application&amp;quot;)&lt;br /&gt;
    outputChatBox(&amp;quot;Yay, we using now own application!&amp;quot;)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordApplicationID]]&lt;br /&gt;
[[de:setDiscordApplicationID]]&lt;br /&gt;
[[hu:setDiscordApplicationID]]&lt;br /&gt;
[[pl:setDiscordApplicationID]]&lt;br /&gt;
[[ro:setDiscordApplicationID]]&lt;br /&gt;
[[ru:SetDiscordApplicationID]]&lt;br /&gt;
[[PT-BR:SetDiscordApplicationID]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceDetails&amp;diff=78185</id>
		<title>SetDiscordRichPresenceDetails</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceDetails&amp;diff=78185"/>
		<updated>2023-10-10T20:08:23Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Important Note|To use this function, you must set up own application [[setDiscordApplicationID]]}}&lt;br /&gt;
The function sets own details text on Rich Presence.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceDetails(string details)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setDetails}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''details''': a string with details name&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints out if the application was successfully set up and set custom state and details text.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    local name = getPlayerName(localPlayer)&lt;br /&gt;
    setDiscordRichPresenceState(&amp;quot;In-game&amp;quot;)&lt;br /&gt;
    setDiscordRichPresenceDetails(&amp;quot;currently as &amp;quot;..name)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[de:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[hu:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[pl:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[ro:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceDetails]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceDetails]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceState&amp;diff=78184</id>
		<title>SetDiscordRichPresenceState</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceState&amp;diff=78184"/>
		<updated>2023-10-10T20:07:56Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Important Note|To use this function, you must set up own application [[setDiscordApplicationID]]}}&lt;br /&gt;
The function sets own status text on Rich Presence.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceState(string state)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setState}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''state''': a string with status name&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints out if the application was successfully set up and set custom text state.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    setDiscordRichPresenceState(&amp;quot;waiting in lobby&amp;quot;)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceState]]&lt;br /&gt;
[[de:setDiscordRichPresenceState]]&lt;br /&gt;
[[hu:setDiscordRichPresenceState]]&lt;br /&gt;
[[pl:setDiscordRichPresenceState]]&lt;br /&gt;
[[ro:setDiscordRichPresenceState]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceState]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceState]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceState&amp;diff=78183</id>
		<title>SetDiscordRichPresenceState</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceState&amp;diff=78183"/>
		<updated>2023-10-10T20:07:33Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Important Note|To use this function, you must set up own application [[setDiscordApplicationID]]}}&lt;br /&gt;
The function sets own status text on Rich Presence.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceState(string state)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setState}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''state''': a string with status name&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints out if the application was successfully set up and set custom asset image.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    setDiscordRichPresenceState(&amp;quot;waiting in lobby&amp;quot;)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceState]]&lt;br /&gt;
[[de:setDiscordRichPresenceState]]&lt;br /&gt;
[[hu:setDiscordRichPresenceState]]&lt;br /&gt;
[[pl:setDiscordRichPresenceState]]&lt;br /&gt;
[[ro:setDiscordRichPresenceState]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceState]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceState]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceSmallAsset&amp;diff=78182</id>
		<title>SetDiscordRichPresenceSmallAsset</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceSmallAsset&amp;diff=78182"/>
		<updated>2023-10-10T20:07:25Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Important Note|To use this function, you must set up own application [[setDiscordApplicationID]]}}&lt;br /&gt;
The function, you can set the small image of the application. The maximum size of Assets is ''1024x1024'', the minimum ''512x512''.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceSmallAsset(string assetImage, string text)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setSmallAsset}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''assetImage''': a string indicating the image you uploaded to your application's asset list.&lt;br /&gt;
*'''text''': a string displayed if someone hovers over the image in Discord.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
The example sets the image to my_logo.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;setsmalllogo&amp;quot;,&lt;br /&gt;
    function ()&lt;br /&gt;
        if isDiscordRichPresenceConnected() then &lt;br /&gt;
            setDiscordRichPresenceSmallAsset(&amp;quot;my_small_logo&amp;quot;, &amp;quot;This is my small logo!&amp;quot;)&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;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[de:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[hu:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[pl:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[ro:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceAsset]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceAsset]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceDetails&amp;diff=78181</id>
		<title>SetDiscordRichPresenceDetails</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceDetails&amp;diff=78181"/>
		<updated>2023-10-10T20:07:15Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Important Note|To use this function, you must set up own application [[setDiscordApplicationID]]}}&lt;br /&gt;
The function sets own details text on Rich Presence.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceDetails(string details)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setDetails}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''details''': a string with details name&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints out if the application was successfully set up and set custom asset image.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    local name = getPlayerName(localPlayer)&lt;br /&gt;
    setDiscordRichPresenceState(&amp;quot;In-game&amp;quot;)&lt;br /&gt;
    setDiscordRichPresenceDetails(&amp;quot;currently as &amp;quot;..name)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[de:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[hu:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[pl:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[ro:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceDetails]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceDetails]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceButton&amp;diff=78180</id>
		<title>SetDiscordRichPresenceButton</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceButton&amp;diff=78180"/>
		<updated>2023-10-10T20:07:03Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Important Note|To use this function, you must set up own application [[setDiscordApplicationID]]}}&lt;br /&gt;
The function sets a custom button through which we can access the website on Discord.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceButton(int index, string text, string url)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setButton}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''index''': a int index of the button (possible 1 and 2)&lt;br /&gt;
*'''text''': a string with title name&lt;br /&gt;
*'''url''': a string with url name (works only with '''https://''' or '''mtasa://''')&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints out if the application was successfully set up and set custom buttons.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    setDiscordRichPresenceButton(1, &amp;quot;Connect to server&amp;quot;, &amp;quot;mtasa://youraddressip&amp;quot;)&lt;br /&gt;
    setDiscordRichPresenceButton(2, &amp;quot;MTA Homepage&amp;quot;, &amp;quot;https:/mtasa.com&amp;quot;)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceButton]]&lt;br /&gt;
[[de:setDiscordRichPresenceButton]]&lt;br /&gt;
[[hu:setDiscordRichPresenceButton]]&lt;br /&gt;
[[pl:setDiscordRichPresenceButton]]&lt;br /&gt;
[[ro:setDiscordRichPresenceButton]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceButton]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceButton]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceAsset&amp;diff=78179</id>
		<title>SetDiscordRichPresenceAsset</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceAsset&amp;diff=78179"/>
		<updated>2023-10-10T20:06:44Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Important Note|To use this function, you must set up own application [[setDiscordApplicationID]]}}&lt;br /&gt;
The function, you can set the main image of the application. The maximum size of Assets is ''1024x1024'', the minimum ''512x512''.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceAsset(string assetImage, string text)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setAsset}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''assetImage''': a string indicating the image you uploaded to your application's asset list.&lt;br /&gt;
*'''text''': a string displayed if someone hovers over the image in Discord.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
The example sets the image to my_logo.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;setlogo&amp;quot;,&lt;br /&gt;
    function ()&lt;br /&gt;
        if isDiscordRichPresenceConnected() then &lt;br /&gt;
            setDiscordRichPresenceAsset(&amp;quot;my_logo&amp;quot;, &amp;quot;This is my logo!&amp;quot;)&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;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[de:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[hu:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[pl:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[ro:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceAsset]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceAsset]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceButton&amp;diff=78178</id>
		<title>SetDiscordRichPresenceButton</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceButton&amp;diff=78178"/>
		<updated>2023-10-10T20:05:23Z</updated>

		<summary type="html">&lt;p&gt;Znajder: Created page with &amp;quot;__NOTOC__  {{Client function}} The function sets a custom button through which we can access the website on Discord.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool setDiscordRichPresenceButton(int index, string text, string url) &amp;lt;/syntaxhighlight&amp;gt;  {{OOP||DiscordRPC:setButton}}  ===Required arguments=== *'''index''': a int index of the button (possible 1 and 2) *'''text''': a string with title name *'''url''': a string with url name (works only with '''https://''' or...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
The function sets a custom button through which we can access the website on Discord.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceButton(int index, string text, string url)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setButton}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''index''': a int index of the button (possible 1 and 2)&lt;br /&gt;
*'''text''': a string with title name&lt;br /&gt;
*'''url''': a string with url name (works only with '''https://''' or '''mtasa://''')&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints out if the application was successfully set up and set custom buttons.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    setDiscordRichPresenceButton(1, &amp;quot;Connect to server&amp;quot;, &amp;quot;mtasa://youraddressip&amp;quot;)&lt;br /&gt;
    setDiscordRichPresenceButton(2, &amp;quot;MTA Homepage&amp;quot;, &amp;quot;https:/mtasa.com&amp;quot;)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceButton]]&lt;br /&gt;
[[de:setDiscordRichPresenceButton]]&lt;br /&gt;
[[hu:setDiscordRichPresenceButton]]&lt;br /&gt;
[[pl:setDiscordRichPresenceButton]]&lt;br /&gt;
[[ro:setDiscordRichPresenceButton]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceButton]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceButton]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceState&amp;diff=78177</id>
		<title>SetDiscordRichPresenceState</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceState&amp;diff=78177"/>
		<updated>2023-10-10T19:59:55Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
The function sets own status text on Rich Presence.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceState(string state)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setState}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''state''': a string with status name&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints out if the application was successfully set up and set custom asset image.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    setDiscordRichPresenceState(&amp;quot;waiting in lobby&amp;quot;)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceState]]&lt;br /&gt;
[[de:setDiscordRichPresenceState]]&lt;br /&gt;
[[hu:setDiscordRichPresenceState]]&lt;br /&gt;
[[pl:setDiscordRichPresenceState]]&lt;br /&gt;
[[ro:setDiscordRichPresenceState]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceState]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceState]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceState&amp;diff=78176</id>
		<title>SetDiscordRichPresenceState</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceState&amp;diff=78176"/>
		<updated>2023-10-10T19:59:39Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
The function sets own status text on Rich Presence.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceState(string state)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setState}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''state''': a string with status name&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints out if the application was successfully set up and set custom asset image.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    setDiscordRichPresenceState(&amp;quot;waiting for lobby...&amp;quot;)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceState]]&lt;br /&gt;
[[de:setDiscordRichPresenceState]]&lt;br /&gt;
[[hu:setDiscordRichPresenceState]]&lt;br /&gt;
[[pl:setDiscordRichPresenceState]]&lt;br /&gt;
[[ro:setDiscordRichPresenceState]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceState]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceState]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceDetails&amp;diff=78175</id>
		<title>SetDiscordRichPresenceDetails</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceDetails&amp;diff=78175"/>
		<updated>2023-10-10T19:58:50Z</updated>

		<summary type="html">&lt;p&gt;Znajder: Created page with &amp;quot;__NOTOC__  {{Client function}} The function sets own details text on Rich Presence.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool setDiscordRichPresenceDetails(string details) &amp;lt;/syntaxhighlight&amp;gt;  {{OOP||DiscordRPC:setDetails}}  ===Required arguments=== *'''details''': a string with details name  ===Returns=== Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.  ==Example== This example prints out if the application was succes...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
The function sets own details text on Rich Presence.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceDetails(string details)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setDetails}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''details''': a string with details name&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints out if the application was successfully set up and set custom asset image.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    local name = getPlayerName(localPlayer)&lt;br /&gt;
    setDiscordRichPresenceState(&amp;quot;In-game&amp;quot;)&lt;br /&gt;
    setDiscordRichPresenceDetails(&amp;quot;currently as &amp;quot;..name)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[de:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[hu:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[pl:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[ro:setDiscordRichPresenceDetails]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceDetails]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceDetails]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceState&amp;diff=78174</id>
		<title>SetDiscordRichPresenceState</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceState&amp;diff=78174"/>
		<updated>2023-10-10T19:56:48Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
The function sets own status text on Rich Presence.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceState(string state)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setState}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''state''': a string with status name&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints out if the application was successfully set up and set custom asset image.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    local name = getPlayerName(localPlayer)&lt;br /&gt;
    setDiscordRichPresenceState(&amp;quot;currently as &amp;quot;..name)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceState]]&lt;br /&gt;
[[de:setDiscordRichPresenceState]]&lt;br /&gt;
[[hu:setDiscordRichPresenceState]]&lt;br /&gt;
[[pl:setDiscordRichPresenceState]]&lt;br /&gt;
[[ro:setDiscordRichPresenceState]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceState]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceState]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceState&amp;diff=78173</id>
		<title>SetDiscordRichPresenceState</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceState&amp;diff=78173"/>
		<updated>2023-10-10T19:51:10Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
The function sets own status text on Rich Presence.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceState(string state)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setState}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''state''': a string with status name&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints out if the application was successfully set up and set custom asset image.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    local name = getPlayerName(localPlayer)&lt;br /&gt;
    setDiscordRichPresenceState(&amp;quot;currently as &amp;quot;..name)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordApplicationID]]&lt;br /&gt;
[[de:setDiscordApplicationID]]&lt;br /&gt;
[[hu:setDiscordApplicationID]]&lt;br /&gt;
[[pl:setDiscordApplicationID]]&lt;br /&gt;
[[ro:setDiscordApplicationID]]&lt;br /&gt;
[[ru:SetDiscordApplicationID]]&lt;br /&gt;
[[PT-BR:SetDiscordApplicationID]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceState&amp;diff=78172</id>
		<title>SetDiscordRichPresenceState</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceState&amp;diff=78172"/>
		<updated>2023-10-10T19:50:15Z</updated>

		<summary type="html">&lt;p&gt;Znajder: Created page with &amp;quot;__NOTOC__  {{Client function}} The function sets own state text on Rich Presence.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool setDiscordRichPresenceState(string state) &amp;lt;/syntaxhighlight&amp;gt;  {{OOP||DiscordRPC:setState}}  ===Required arguments=== *'''state''': a string with state name  ===Returns=== Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.  ==Example== This example prints out if the application was successfully set u...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
The function sets own state text on Rich Presence.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceState(string state)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setState}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''state''': a string with state name&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints out if the application was successfully set up and set custom asset image.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    local name = getPlayerName(localPlayer)&lt;br /&gt;
    setDiscordRichPresenceState(&amp;quot;currently as &amp;quot;..name)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordApplicationID]]&lt;br /&gt;
[[de:setDiscordApplicationID]]&lt;br /&gt;
[[hu:setDiscordApplicationID]]&lt;br /&gt;
[[pl:setDiscordApplicationID]]&lt;br /&gt;
[[ro:setDiscordApplicationID]]&lt;br /&gt;
[[ru:SetDiscordApplicationID]]&lt;br /&gt;
[[PT-BR:SetDiscordApplicationID]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceSmallAsset&amp;diff=78171</id>
		<title>SetDiscordRichPresenceSmallAsset</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceSmallAsset&amp;diff=78171"/>
		<updated>2023-10-10T19:45:09Z</updated>

		<summary type="html">&lt;p&gt;Znajder: Created page with &amp;quot;__NOTOC__  {{Client function}} The function, you can set the small image of the application. The maximum size of Assets is ''1024x1024'', the minimum ''512x512''.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool setDiscordRichPresenceSmallAsset(string assetImage, string text) &amp;lt;/syntaxhighlight&amp;gt;  {{OOP||DiscordRPC:setSmallAsset}}  ===Required arguments=== *'''assetImage''': a string indicating the image you uploaded to your application's asset list. *'''text''': a strin...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
The function, you can set the small image of the application. The maximum size of Assets is ''1024x1024'', the minimum ''512x512''.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceSmallAsset(string assetImage, string text)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setSmallAsset}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''assetImage''': a string indicating the image you uploaded to your application's asset list.&lt;br /&gt;
*'''text''': a string displayed if someone hovers over the image in Discord.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
The example sets the image to my_logo.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;setsmalllogo&amp;quot;,&lt;br /&gt;
    function ()&lt;br /&gt;
        if isDiscordRichPresenceConnected() then &lt;br /&gt;
            setDiscordRichPresenceSmallAsset(&amp;quot;my_small_logo&amp;quot;, &amp;quot;This is my small logo!&amp;quot;)&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;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[de:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[hu:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[pl:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[ro:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceAsset]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceAsset]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceAsset&amp;diff=78170</id>
		<title>SetDiscordRichPresenceAsset</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordRichPresenceAsset&amp;diff=78170"/>
		<updated>2023-10-10T19:43:50Z</updated>

		<summary type="html">&lt;p&gt;Znajder: Created page with &amp;quot;__NOTOC__  {{Client function}} The function, you can set the main image of the application. The maximum size of Assets is ''1024x1024'', the minimum ''512x512''.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool setDiscordRichPresenceAsset(string assetImage, string text) &amp;lt;/syntaxhighlight&amp;gt;  {{OOP||DiscordRPC:setAsset}}  ===Required arguments=== *'''assetImage''': a string indicating the image you uploaded to your application's asset list. *'''text''': a string displayed...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
The function, you can set the main image of the application. The maximum size of Assets is ''1024x1024'', the minimum ''512x512''.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordRichPresenceAsset(string assetImage, string text)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setAsset}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''assetImage''': a string indicating the image you uploaded to your application's asset list.&lt;br /&gt;
*'''text''': a string displayed if someone hovers over the image in Discord.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
The example sets the image to my_logo.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;setlogo&amp;quot;,&lt;br /&gt;
    function ()&lt;br /&gt;
        if isDiscordRichPresenceConnected() then &lt;br /&gt;
            setDiscordRichPresenceAsset(&amp;quot;my_logo&amp;quot;, &amp;quot;This is my logo!&amp;quot;)&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;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[de:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[hu:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[pl:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[ro:setDiscordRichPresenceAsset]]&lt;br /&gt;
[[ru:SetDiscordRichPresenceAsset]]&lt;br /&gt;
[[PT-BR:SetDiscordRichPresenceAsset]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ResetDiscordRichPresenceData&amp;diff=78169</id>
		<title>ResetDiscordRichPresenceData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ResetDiscordRichPresenceData&amp;diff=78169"/>
		<updated>2023-10-10T19:33:31Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
The function resets all the data we have previously transmitted and sets to default.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool resetDiscordRichPresenceData()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
The example shows if you set up your own application and sample asset and then reset the data.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setDiscordApplicationID(&amp;quot;you_application_key&amp;quot;)&lt;br /&gt;
setDiscordRichPresenceAsset(&amp;quot;asset_logo&amp;quot;, &amp;quot;Name of Asset&amp;quot;)&lt;br /&gt;
if resetDiscordRichPresenceData()  then -- we reset to default by MTA Application.&lt;br /&gt;
    outputChatBox(&amp;quot;Discord Rich Presence has been cleared and restored to default settings.&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:resetDiscordRichPresenceData]]&lt;br /&gt;
[[de:resetDiscordRichPresenceData]]&lt;br /&gt;
[[hu:resetDiscordRichPresenceData]]&lt;br /&gt;
[[pl:resetDiscordRichPresenceData]]&lt;br /&gt;
[[ro:resetDiscordRichPresenceData]]&lt;br /&gt;
[[ru:ResetDiscordRichPresenceData]]&lt;br /&gt;
[[PT-BR:ResetDiscordRichPresenceData]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordApplicationID&amp;diff=78168</id>
		<title>SetDiscordApplicationID</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordApplicationID&amp;diff=78168"/>
		<updated>2023-10-10T19:33:09Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Important Note|To reset, please use [[resetDiscordRichPresenceData]]}}&lt;br /&gt;
The function can assign your own application to use in Rich Presence.&lt;br /&gt;
You can create own '''[https://discord.com/developers/applications here]'''&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordApplicationID(string applicationKey)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setApplication}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''applicationKey''': a string represent key your's Application on Discord.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if function succeeds, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints out if the application was successfully set up and set custom asset image.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    setDiscordRichPresenceAsset(&amp;quot;asset_name_from_application&amp;quot;)&lt;br /&gt;
    outputChatBox(&amp;quot;Yay, we using now own application!&amp;quot;)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordApplicationID]]&lt;br /&gt;
[[de:setDiscordApplicationID]]&lt;br /&gt;
[[hu:setDiscordApplicationID]]&lt;br /&gt;
[[pl:setDiscordApplicationID]]&lt;br /&gt;
[[ro:setDiscordApplicationID]]&lt;br /&gt;
[[ru:SetDiscordApplicationID]]&lt;br /&gt;
[[PT-BR:SetDiscordApplicationID]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordApplicationID&amp;diff=78167</id>
		<title>SetDiscordApplicationID</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordApplicationID&amp;diff=78167"/>
		<updated>2023-10-10T19:31:03Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Important Note|To reset, please use [[resetDiscordRichPresenceData]]}}&lt;br /&gt;
The function can assign your own application to use in Rich Presence.&lt;br /&gt;
You can create own '''[https://discord.com/developers/applications here]'''&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordApplicationID(string applicationKey)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setApplication}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''applicationKey''': a string represent key your's Application on Discord.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if successful, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints out if the application was successfully set up and set custom asset image.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    setDiscordRichPresenceAsset(&amp;quot;asset_name_from_application&amp;quot;)&lt;br /&gt;
    outputChatBox(&amp;quot;Yay, we using now own application!&amp;quot;)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordApplicationID]]&lt;br /&gt;
[[de:setDiscordApplicationID]]&lt;br /&gt;
[[hu:setDiscordApplicationID]]&lt;br /&gt;
[[pl:setDiscordApplicationID]]&lt;br /&gt;
[[ro:setDiscordApplicationID]]&lt;br /&gt;
[[ru:SetDiscordApplicationID]]&lt;br /&gt;
[[PT-BR:SetDiscordApplicationID]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDiscordApplicationID&amp;diff=78166</id>
		<title>SetDiscordApplicationID</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDiscordApplicationID&amp;diff=78166"/>
		<updated>2023-10-10T19:28:58Z</updated>

		<summary type="html">&lt;p&gt;Znajder: Created page with &amp;quot;__NOTOC__  {{Client function}} {{Important Note|To reset, please use resetDiscordRichPresenceData}} The function can assign your own application to use in Rich Presence. You can create own '''[https://discord.com/developers/applications here]'''  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool setDiscordApplicationID(string applicationKey) &amp;lt;/syntaxhighlight&amp;gt;  {{OOP||DiscordRPC:setApplication}}  ===Required arguments=== *'''applicationKey''': a string represent key...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Important Note|To reset, please use [[resetDiscordRichPresenceData]]}}&lt;br /&gt;
The function can assign your own application to use in Rich Presence.&lt;br /&gt;
You can create own '''[https://discord.com/developers/applications here]'''&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setDiscordApplicationID(string applicationKey)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:setApplication}}&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''applicationKey''': a string represent key your's Application on Discord.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if successful, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints out if the application was successfully set up.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local app_key = &amp;quot;YOUR_APPLICATION_KEY&amp;quot;&lt;br /&gt;
if setDiscordApplicationID(app_key) then &lt;br /&gt;
    setDiscordRichPresenceAsset(&amp;quot;asset_name_from_application&amp;quot;)&lt;br /&gt;
    outputChatBox(&amp;quot;Yay, we using now own application!&amp;quot;)&lt;br /&gt;
end &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setDiscordApplicationID]]&lt;br /&gt;
[[de:setDiscordApplicationID]]&lt;br /&gt;
[[hu:setDiscordApplicationID]]&lt;br /&gt;
[[pl:setDiscordApplicationID]]&lt;br /&gt;
[[ro:setDiscordApplicationID]]&lt;br /&gt;
[[ru:SetDiscordApplicationID]]&lt;br /&gt;
[[PT-BR:SetDiscordApplicationID]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ResetDiscordRichPresenceData&amp;diff=78165</id>
		<title>ResetDiscordRichPresenceData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ResetDiscordRichPresenceData&amp;diff=78165"/>
		<updated>2023-10-10T19:04:11Z</updated>

		<summary type="html">&lt;p&gt;Znajder: Created page with &amp;quot;__NOTOC__  {{Client function}} The function resets all the data we have previously transmitted and sets to default.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool resetDiscordRichPresenceData() &amp;lt;/syntaxhighlight&amp;gt;   ===Returns=== Returns ''true'' if reset was successfull, ''false'' if the client has disabled synchronisation.  ==Example== The example shows if you set up your own application and sample asset and then reset the data. &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; setDiscordAp...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
The function resets all the data we have previously transmitted and sets to default.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool resetDiscordRichPresenceData()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if reset was successfull, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
The example shows if you set up your own application and sample asset and then reset the data.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setDiscordApplicationID(&amp;quot;you_application_key&amp;quot;)&lt;br /&gt;
setDiscordRichPresenceAsset(&amp;quot;asset_logo&amp;quot;, &amp;quot;Name of Asset&amp;quot;)&lt;br /&gt;
if resetDiscordRichPresenceData()  then -- we reset to default by MTA Application.&lt;br /&gt;
    outputChatBox(&amp;quot;Discord Rich Presence has been cleared and restored to default settings.&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:resetDiscordRichPresenceData]]&lt;br /&gt;
[[de:resetDiscordRichPresenceData]]&lt;br /&gt;
[[hu:resetDiscordRichPresenceData]]&lt;br /&gt;
[[pl:resetDiscordRichPresenceData]]&lt;br /&gt;
[[ro:resetDiscordRichPresenceData]]&lt;br /&gt;
[[ru:ResetDiscordRichPresenceData]]&lt;br /&gt;
[[PT-BR:ResetDiscordRichPresenceData]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsDiscordRichPresenceConnected&amp;diff=78164</id>
		<title>IsDiscordRichPresenceConnected</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsDiscordRichPresenceConnected&amp;diff=78164"/>
		<updated>2023-10-10T18:53:44Z</updated>

		<summary type="html">&lt;p&gt;Znajder: Created page with &amp;quot;__NOTOC__  {{Client function}} The function check the client has synchronisation with Discord Rich Presence enabled.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool isDiscordRichPresenceConnected() &amp;lt;/syntaxhighlight&amp;gt;  {{OOP||DiscordRPC:isConnected}}  ===Returns=== Returns ''true'' if the Discord Rich Presence is enabled on the client, ''false'' if the client has disabled synchronisation.  ==Example== This example prints out if the client has enabled Discord Rich Prese...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
The function check the client has synchronisation with Discord Rich Presence enabled.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool isDiscordRichPresenceConnected()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[DiscordRPC]]:isConnected}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the Discord Rich Presence is enabled on the client, ''false'' if the client has disabled synchronisation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints out if the client has enabled Discord Rich Presence.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;checkdiscord&amp;quot;,&lt;br /&gt;
    function ()&lt;br /&gt;
        if isDiscordRichPresenceConnected() then &lt;br /&gt;
            outputChatBox(&amp;quot;You are using Discord Rich Presence, that's cool!&amp;quot;)&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;
{{Client_Discord_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:isDiscordRichPresenceConnected]]&lt;br /&gt;
[[de:isDiscordRichPresenceConnected]]&lt;br /&gt;
[[hu:isDiscordRichPresenceConnected]]&lt;br /&gt;
[[pl:isDiscordRichPresenceConnected]]&lt;br /&gt;
[[ro:isDiscordRichPresenceConnected]]&lt;br /&gt;
[[ru:IsDiscordRichPresenceConnected]]&lt;br /&gt;
[[PT-BR:IsDiscordRichPresenceConnected]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Client_Discord_functions&amp;diff=78163</id>
		<title>Template:Client Discord functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Client_Discord_functions&amp;diff=78163"/>
		<updated>2023-10-10T18:40:19Z</updated>

		<summary type="html">&lt;p&gt;Znajder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[isDiscordRichPresenceConnected]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[resetDiscordRichPresenceData]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordApplicationID]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceAsset]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceButton]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceDetails]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceSmallAsset]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceState]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Functions templates]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Client_Discord_functions&amp;diff=78162</id>
		<title>Template:Client Discord functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Client_Discord_functions&amp;diff=78162"/>
		<updated>2023-10-10T18:38:36Z</updated>

		<summary type="html">&lt;p&gt;Znajder: Created page with &amp;quot;&amp;lt;ul&amp;gt; &amp;lt;li&amp;gt;setDiscordApplicationID&amp;lt;/li&amp;gt; &amp;lt;li&amp;gt;setDiscordRichPresenceDetails&amp;lt;/li&amp;gt; &amp;lt;li&amp;gt;setDiscordRichPresenceState&amp;lt;/li&amp;gt; &amp;lt;li&amp;gt;setDiscordRichPresenceAsset&amp;lt;/li&amp;gt; &amp;lt;li&amp;gt;setDiscordRichPresenceSmallAsset&amp;lt;/li&amp;gt; &amp;lt;li&amp;gt;setDiscordRichPresenceButton&amp;lt;/li&amp;gt; &amp;lt;li&amp;gt;resetDiscordRichPresenceData&amp;lt;/li&amp;gt; &amp;lt;li&amp;gt;isDiscordRichPresenceConnected&amp;lt;/li&amp;gt; &amp;lt;/ul&amp;gt;  &amp;lt;noinclude&amp;gt;Category:Functions templates&amp;lt;/noinclude&amp;gt;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordApplicationID]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceDetails]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceState]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceAsset]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceSmallAsset]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[setDiscordRichPresenceButton]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[resetDiscordRichPresenceData]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[isDiscordRichPresenceConnected]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Functions templates]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Client_Scripting_Functions&amp;diff=78126</id>
		<title>Client Scripting Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Client_Scripting_Functions&amp;diff=78126"/>
		<updated>2023-10-09T20:22:52Z</updated>

		<summary type="html">&lt;p&gt;Znajder: add discord tab&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pageclass class=&amp;quot;client&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt;&lt;br /&gt;
{{Adding_Pages_to_Categories_and_Templates}}&lt;br /&gt;
This page lists all the '''client-side''' scripting functions that have been implemented and are available as native functions from the Deathmatch mod. To request a function, create an issue in [https://github.com/multitheftauto/mtasa-blue/issues our GitHub repository.]&lt;br /&gt;
 &lt;br /&gt;
For more functions, check the [[Useful_Functions|useful functions page]].&lt;br /&gt;
__TOC__&lt;br /&gt;
 &lt;br /&gt;
==Audio functions==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Blip functions==&lt;br /&gt;
{{Client_blip_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Browser functions==&lt;br /&gt;
{{CEF_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Camera functions==&lt;br /&gt;
{{Client_camera_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Clothes and body functions==&lt;br /&gt;
{{Client_Clothes_and_body_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Collision shape functions==&lt;br /&gt;
{{Client_collision_shape_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Cursor functions==&lt;br /&gt;
{{Client_cursor_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Drawing functions==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
&lt;br /&gt;
==Discord functions==&lt;br /&gt;
{{Client_Discord_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Effects functions==&lt;br /&gt;
{{Client_Effects_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Element functions==&lt;br /&gt;
{{Client_element_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Engine functions==&lt;br /&gt;
{{Engine_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Event functions==&lt;br /&gt;
{{Client_event_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Explosion functions==&lt;br /&gt;
{{Client_explosion_functions}}&lt;br /&gt;
 &lt;br /&gt;
==File functions==&lt;br /&gt;
{{Client_file_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Fire functions==&lt;br /&gt;
{{Client_fire_functions}}&lt;br /&gt;
 &lt;br /&gt;
==GUI functions==&lt;br /&gt;
{{GUI_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Input functions==&lt;br /&gt;
{{Client_input_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Light functions==&lt;br /&gt;
{{Client_light_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Marker functions==&lt;br /&gt;
{{Client_marker_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Matrix functions==&lt;br /&gt;
{{Shared_matrix_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Object functions==&lt;br /&gt;
{{Client_object_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Output functions==&lt;br /&gt;
{{Client_output_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Ped functions==&lt;br /&gt;
{{Client_ped_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Pickup functions==&lt;br /&gt;
{{Client_pickup_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Player functions==&lt;br /&gt;
{{Client_player_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Projectile functions==&lt;br /&gt;
{{Client_projectile_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Radar area functions==&lt;br /&gt;
{{Client_radar-area_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Resource functions==&lt;br /&gt;
{{Client_resource_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Searchlight functions==&lt;br /&gt;
{{Client_searchlight_functions}}&lt;br /&gt;
 &lt;br /&gt;
==SVG functions==&lt;br /&gt;
{{SVG_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Team functions==&lt;br /&gt;
{{Client_team_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Utility functions==&lt;br /&gt;
{{Client_utility_functions}}&lt;br /&gt;
 &lt;br /&gt;
==UTF8 Library==&lt;br /&gt;
{{UTF8_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Vehicle functions==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Water functions==&lt;br /&gt;
{{Client_water_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Weapon functions==&lt;br /&gt;
{{Client_weapon_functions}}&lt;br /&gt;
 &lt;br /&gt;
==Weapon creation functions==&lt;br /&gt;
{{Client_weapon_creation_functions}}&lt;br /&gt;
 &lt;br /&gt;
==World functions==&lt;br /&gt;
{{Client_world_functions}}&lt;br /&gt;
 &lt;br /&gt;
==XML functions==&lt;br /&gt;
{{Client_XML_functions}}&lt;br /&gt;
 &lt;br /&gt;
[[ar:Client Scripting Functions]]&lt;br /&gt;
[[de:Clientseitige_Funktionen]]&lt;br /&gt;
[[es:Funciones del cliente]]&lt;br /&gt;
[[hu:Kliens oldali függvények]]&lt;br /&gt;
[[it:Funzioni Client-side]]&lt;br /&gt;
[[pl:Client Scripting Functions]]&lt;br /&gt;
[[pt-br:Funções de Scripting do Cliente]]&lt;br /&gt;
[[ru:Client Scripting Functions]]&lt;br /&gt;
[[tr:Client Taraflı Fonksiyonlar]]&lt;br /&gt;
[[zh-cn:客户端脚本函数]]&lt;/div&gt;</summary>
		<author><name>Znajder</name></author>
	</entry>
</feed>