First thing you have to do is make a discord https://discordapp.com/ account if you haven’t done that already.
If you have a discord account go to https://discordapp.com/developers/applications/
- First make a new application by clicking the “Create an application”
- When you create a new application, you will see a similar page as shown below on the foto.
- You will have to copy the Application id (See the arrow) and save it for later.
- Now you need to navigate to te left navigation bar and go to Rich Presence>Art Assets.
- This is where the magic starts, here you can upload you image.(The image has to be 512x512 pixels or lager)
- If you have uploaded the image you will need to remember the image name and don’t forget to hit “Save Changes”
Now we have the discord application id and the image name. Last, we have to put those values into a script.
I have made a very very getto and simple script for you to test it with.
- make a folder inside the server resource folder and call it discord
- make 2 files one called __resource.lua and one called client.lua
- paste the code below into the correct file
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' client_script 'client.lua'
Citizen.CreateThread(function() while true do --This is the Application ID (Replace this with you own) SetDiscordAppId(123456788967867867) --Here you will have to put the image name. SetDiscordRichPresenceAsset('logo_name') --It updates every one minute just in case. Citizen.Wait(60000) end end)
If you followed all the steps and used common knowledge, you will see this
you might want to leave a like if you found this post helpfull
(This post might contain grammar mistakes)