[Tutorial] Discord Rich Presence for SAMP server!
#1

Rich Presence allows users to give more information about the game they're playing. Since GTA SA is abandoned by Rockstar, we probably won't be getting Rich Presence for GTA SA. That's where I come, making this thing.

The rich presence looks like this:

(You can fully customize this)

REQUIREMENTS:
• NodeJS (available here https://nodejs.org/en/download/ )
• (Optional) Git https://git-scm.com/downloads

1) Go to this GitHub Repo and clone it somewhere. Then in the folder do this (If not on Windows then open a console or command center and navigate it to the folder where you cloned the GitHub Repo) and type npm i to install dependencies of EasyRPC. You will get some "npm warn discord" errors, ignore those.

2) Go to https://discordapp.com/developers/docs/intro (and login to your Discord account if you haven't already {You might have to click on the URL again after logging in}).

3) Create an application (in discord). Give it a name (the name will be the text which will be shown after "Playing" in your Discord Status {Thats why you should name it GTA: SA-MP or something like that})

4) Then scroll down and enable Rich Presence

5) Upload a large asset (which will be the server logo)

(non-transparent background suggested)
and after uploading don't forget to hit save changes. Take note of the image name (for example it was hero_mercy in discord)

6) Then upload a small image with any player skin
Let's say I want to upload this skin

You must be wondering, what the heck is the logo doing in the player image, well I added a part of the logo to blend it a bit more with the big image as the skin might take a part of the logo (as seen on the example rich presence image). Take note of the image name (for example it was hero_mercy in discord)

Then after you're all set, edit the config.json.example and replace the client ID from 340755371629215744 to the client ID of the app you created on discord (scroll up on the API page to get the client ID). See the example rich presence image and then edit the "details", "state", "smallText" and "largeText" as shown here;

The "smallKey" is the name of the skin image and the "largeKey" is the name of the logo. Edit it out according to the name you uploaded them as. Then save the config.json.example file as config.json in the folder where you cloned the GitHub Repo.

After all that is done, type npm start in the command prompt or console.

You can follow https://salobby.eu/showthread.php?tid=143 this tutorial if you are a player.
Reply
#2

Wow amazing.
Reply
#3

Quote:
Originally Posted by [HLF]Southclaw
View Post
Nice work! I was wondering how long it would be before someone uses the Rich Presence API for SA:MP! I'm excited to see how servers use this feature in the future.
Would've been nice if SA-MP itself could implement it for the game. But it won't be fully perfect considering the fact of image limit of discord.
Reply
#4


I get this((
Reply
#5

Quote:
Originally Posted by paukart
View Post

I get this((
Just use this https://sampforum.blast.hk/showthread.php?tid=650275
No need of nodejs and all, just put the .asi(make sure to have a asi loader) in your gta sa root folder and you are ready to go.
Reply
#6

Quote:
Originally Posted by paukart
View Post

I get this((
I also get this. What's the issue?
Reply
#7

Ok, maybe i din't understand NOTHING AAAAAAAAAAAAAAAAAAAAA
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)