[How-to] [Updated] Discord rich presence Custom Image šŸž

Or no? I have changed it to the right one but still does not work? lol

1 Like
Citizen.CreateThread(function()
	while true do
		Citizen.Wait(10000) -- in MS
		SetDiscordAppId(123456789101112) -- This is the bot client ID
		SetDiscordRichPresenceAsset('large_asset_name_here')
		SetDiscordRichPresenceAssetText('whatever_you_want_large_hover_to_say')
		SetDiscordRichPresenceAssetSmall('small_asset_name_here')
		SetDiscordRichPresenceAssetSmallText('whatever_you_want_small_hover_to_say')
		SetRichPresence('words_here')
	end
end)

Sadly does not work

Well I don’t know what to tell you. Not sure why you’re blocking the Client ID as the general public can’t do anything with that number.

Escape the 's if it’s inside the string, or use "s for the string.

1 Like

Arrh maybe will try thanks. Will comment if it worked

Hey Can some One help me how i make it so that you See the id from the Player in the Text Where the pictures are too?

Hey! I need help with pulling the players ID and showing it in the text as well, along with maybe their character names - would be super nice for RP servers. Unfortunately the codes that you’ve written above doesn’t work. I’m running vRP. Let me know if you can help, always willing to provide something back as well. :smile:

ID - GetPlayerServerId(PlayerId()) For character names that would depend on whatever you are using to store the player names.

1 Like

Hey! Yeps, I’ve tried that, but it pulls the ID depending on who joined the server first - an example would be me owning the server and being ID 1. However, if I join second (when there’s already someone on the server), Rich Presence would show I’m ID 2, and the person who joined first would be ID 1. Screenshot - f0ca17e514a0f6689cb19b44b78fd12d - Gyazo

But that is normal behaviour.

Hm, not exactly what I was looking for. How would I go about pulling their actual in-game assigned ID from the database to Rich Presence then? This also goes for the PlayerName thing, I’d like to pull their first name from the database to rich presence, etc.

Do the query server side then pass it to the client.

1 Like

I know I’m being a total blimbo now, but how would I go about doing that? I’m just starting out trying to do some coding work, so I’m mainly just editing files right now - starting off with this one. :smiley:

I can’t think right now, I’m tired. I’m sure somebody else will reply when I’m :zzz:-ing. Probably best if I don’t reply right now anyway, otherwise I’d probably give some false information.

For an RP environment, - unless you’re using it for Discord moderation - I’d suggest keeping semi-sensitive information out of it. People can get quite creative about what they do with IDs, so on and so forth.

2 Likes

Appreciate the help nonetheless, sleep tight! :sleeping:

1 Like

Eyyyy friendo! Yeah, it’d be both for moderation, but also so we can easily track people through rcon and rich presence. :slight_smile:

Hey, nobody ever came to my rescue :smiley:

How you do the 2/64?