SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Tools and Files

Reply
 
Thread Tools Display Modes
Old 30/11/2017, 03:36 PM   #1
sowad
Little Clucker
 
sowad's Avatar
 
Join Date: Mar 2015
Posts: 11
Reputation: 13
Default Discord Rich Presence for SAMP server!

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.
__________________

Join me now at San Andreas Lobby!

San Andreas Lobby - Discord Rich Presence for SAMP
sowad is offline   Reply With Quote
Old 30/11/2017, 03:38 PM   #2
aoky
Huge Clucker
 
aoky's Avatar
 
Join Date: Oct 2016
Location: Czech Republic
Posts: 492
Reputation: 136
Default Re: Discord Rich Presence for SAMP server!

Wow amazing.
__________________
owner/developer @ koky's deathmatch
aoky is offline   Reply With Quote
Old 30/11/2017, 03:46 PM   #3
sowad
Little Clucker
 
sowad's Avatar
 
Join Date: Mar 2015
Posts: 11
Reputation: 13
Default Re: Discord Rich Presence for SAMP server!

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.
__________________

Join me now at San Andreas Lobby!

San Andreas Lobby - Discord Rich Presence for SAMP
sowad is offline   Reply With Quote
Old 04/03/2018, 03:31 PM   #4
paukart
Little Clucker
 
Join Date: Nov 2016
Posts: 1
Reputation: 0
Default Re: Discord Rich Presence for SAMP server!


I get this((
paukart is offline   Reply With Quote
Old 04/03/2018, 04:17 PM   #5
Zeth
Huge Clucker
 
Zeth's Avatar
 
Join Date: Feb 2017
Location: Titan
Posts: 440
Reputation: 114
Default Re: Discord Rich Presence for SAMP server!

Quote:
Originally Posted by paukart View Post

I get this((
Just use this http://forum.sa-mp.com/showthread.php?t=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.
__________________
server.one-rp.com
Zeth is offline   Reply With Quote
Old 19/07/2018, 11:32 PM   #6
Xadr
Little Clucker
 
Join Date: Jul 2018
Posts: 4
Reputation: 0
Default Re: Discord Rich Presence for SAMP server!

Quote:
Originally Posted by paukart View Post

I get this((
I also get this. What's the issue?
Xadr is offline   Reply With Quote
Old 12/05/2019, 05:49 PM   #7
Jesh
Little Clucker
 
Jesh's Avatar
 
Join Date: Jan 2019
Location: Colombia
Posts: 1
Reputation: 4
Default Re: Discord Rich Presence for SAMP server!

Ok, maybe i din't understand NOTHING AAAAAAAAAAAAAAAAAAAAA
__________________
Spanish user.
FenixZone, the bigger spanish server
Jesh is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 03:58 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.