[How-to] [Updated] Discord rich presence Custom Image 🏞

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 fxmanifest.lua and one called client.lua
  • paste the code below into the correct file

(11-11-2018) Thanx to @d0p3t, we have 3 new natives now
New Natives:

  • SetDiscordRichPresenceAssetSmall
  • SetDiscordRichPresenceAssetSmallText
  • SetDiscordRichPresenceAssetText

(26-02-2021) Thanx to blattersturm, we have a new native
New Native:

  • SetDiscordRichPresenceAction

Check the code below to see how to use them and what they do!


fx_version 'cerulean'
games { 'gta5' }

client_script 'client.lua'


	while true do
        -- This is the Application ID (Replace this with you own)

        -- Here you will have to put the image name for the "large" icon.
        -- (11-11-2018) New Natives:

        -- Here you can add hover text for the "large" icon.
        SetDiscordRichPresenceAssetText('This is a lage icon with text')
        -- Here you will have to put the image name for the "small" icon.

        -- Here you can add hover text for the "small" icon.
        SetDiscordRichPresenceAssetSmallText('This is a lsmall icon with text')

        -- (26-02-2021) New Native:

            Here you can add buttons that will display in your Discord Status,
            First paramater is the button index (0 or 1), second is the title and 
            last is the url (this has to start with "fivem://connect/" or "https://") 
        SetDiscordRichPresenceAction(0, "First Button!", "fivem://connect/localhost:30120")
        SetDiscordRichPresenceAction(1, "Second Button!", "fivem://connect/localhost:30120")

        -- It updates every minute just in case.

If you followed all the steps and used common knowledge, you will see this:

And with the new natives:

New Discord buttons:

you might want to leave a like :heart: if you found this post helpfull

(This post might contain grammar mistakes)


good job! :slight_smile:


This is great, Would be awesome to have the ability to click “Join game” and it loads them into your server IP


This is great, Would be awesome to have the ability to click “Join game” and it loads them into your server IP

This isn’t a public feature, it could be possible but needs manual approval by discord itself. I dont’t see this feature coming in the near feature, but maby some day.


yep, discord has already said it wont accept mods, only games.

1 Like

SetRichPresence('This is a rich presence message under the server name and description')

Should add that to the script as well


If u want to do Krizfrost’s screen


how do you get the player count

1 Like

How can we add this to yours sir ?

while true do
–This is the Application ID (Replace this with you own)

    --Here you will have to put the image name.

    --It updates every one minute just in case.


huh? your question is unclear.

1 Like

Im sorry I was looking to put his code into your RichPresence code so it was one resource, however I ended up making to resources works like a charm :smiley: Thanks both of you!

i never made a richpresence resource… i’ve contributed to the fivem discord rich presence implementation, which is quite different :thinking: .

1 Like

Ah, sorry about that well thanks for the help and the quick reply reguardless

I tried it but it didn’t work. Sad, it was a pretty cool idea.

It works fine. You probably didn’t setup the Discord application correctly.

Please provide information instead of just saying “it doesn’t work”.


I don’t know if i’ll get called a scum for reposting this but i worked on it for a while and thought i would share it. It combines the code from this post “Location Display for Discord Rich Presence” by @ IllusiveTea, the discord asset natives shown here and some touches of my own. :slight_smile:.


  • Before if you where in a Add-On Vehicle it would display “NULL”, it now displays “Add-On Vehicle”.
  • Simplified things when retrieving the VehName.
  • Fixed the __resource.lua being empty when using the download at the bottom.
  • Removed the comments after the 2nd Citizen.CreateThread.
  • Reduced the update time from 15sec to 10sec


  • Instead of saying “Add-On Vehicle” it displays the text defined by in the vehicles.meta
    (e.x. <“gameName”>2017_Ford_GT</“gameName”>, displays: 2017 Ford GT)


resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
client_script 'client.lua'


	while true do
		SetDiscordAppId(123456789012345678) --Discord app id
		SetDiscordRichPresenceAsset('Big_Picture') --Big picture asset name
        SetDiscordRichPresenceAssetText('Big picture text.') --Big picture hover text
        SetDiscordRichPresenceAssetSmall('small_picture') --Small picture asset name
        SetDiscordRichPresenceAssetSmallText('Small picture text') --Small picture hover text
		Citizen.Wait(600000) --How often should this script check for updated assets? (in MS)
--No Need to mess with anything pass this point!
	while true do
		local VehName = GetLabelText(GetDisplayNameFromVehicleModel(GetEntityModel(GetVehiclePedIsUsing(PlayerPedId()))))
		if VehName == "NULL" then VehName = GetDisplayNameFromVehicleModel(GetEntityModel(GetVehiclePedIsUsing(PlayerPedId()))) end
		local x,y,z = table.unpack(GetEntityCoords(PlayerPedId(),true))
		local StreetHash = GetStreetNameAtCoord(x, y, z)
		local pId = GetPlayerServerId(PlayerId())
		local pName = GetPlayerName(PlayerId())
		if StreetHash ~= nil then
			StreetName = GetStreetNameFromHashKey(StreetHash)
			if IsPedOnFoot(PlayerPedId()) and not IsEntityInWater(PlayerPedId()) then
				if IsPedSprinting(PlayerPedId()) then
					SetRichPresence("ID: "..pId.." | "..pName.." is sprinting down "..StreetName)
				elseif IsPedRunning(PlayerPedId()) then
					SetRichPresence("ID: "..pId.." | "..pName.." is running down "..StreetName)
				elseif IsPedWalking(PlayerPedId()) then
					SetRichPresence("ID: "..pId.." | "..pName.." is walking down "..StreetName)
				elseif IsPedStill(PlayerPedId()) then
					SetRichPresence("ID: "..pId.." | "..pName.." is standing on "..StreetName)
			elseif GetVehiclePedIsUsing(PlayerPedId()) ~= nil and not IsPedInAnyHeli(PlayerPedId()) and not IsPedInAnyPlane(PlayerPedId()) and not IsPedOnFoot(PlayerPedId()) and not IsPedInAnySub(PlayerPedId()) and not IsPedInAnyBoat(PlayerPedId()) then
				local MPH = math.ceil(GetEntitySpeed(GetVehiclePedIsUsing(PlayerPedId())) * 2.236936)
				if MPH > 50 then
					SetRichPresence("ID: "..pId.." | "..pName.." is speeding down "..StreetName.." at "..MPH.."MPH in a "..VehName)
				elseif MPH <= 50 and MPH > 0 then
					SetRichPresence("ID: "..pId.." | "..pName.." is cruising down "..StreetName.." at "..MPH.."MPH in a "..VehName)
				elseif MPH == 0 then
					SetRichPresence("ID: "..pId.." | "..pName.." is parked on "..StreetName.." in a "..VehName)
			elseif IsPedInAnyHeli(PlayerPedId()) or IsPedInAnyPlane(PlayerPedId()) then
				if IsEntityInAir(GetVehiclePedIsUsing(PlayerPedId())) or GetEntityHeightAboveGround(GetVehiclePedIsUsing(PlayerPedId())) > 5.0 then
					SetRichPresence("ID: "..pId.." | "..pName.." is flying over "..StreetName.." in a "..VehName)
					SetRichPresence("ID: "..pId.." | "..pName.." is landed at "..StreetName.." in a "..VehName)
			elseif IsEntityInWater(PlayerPedId()) then
				SetRichPresence("ID: "..pId.." | "..pName.." is swimming")
			elseif IsPedInAnyBoat(PlayerPedId()) and IsEntityInWater(GetVehiclePedIsUsing(PlayerPedId())) then
				SetRichPresence("ID: "..pId.." | "..pName.." is sailing in a "..VehName)
			elseif IsPedInAnySub(PlayerPedId()) and IsEntityInWater(GetVehiclePedIsUsing(PlayerPedId())) then
				SetRichPresence("ID: "..pId.." | "..pName.." is in a yellow submarine")

5MDiscordRPv3.zip (1.1 KB)
Notice: Please allow up to 1 minute for the script to fully display the correct details


Hello guys . Can you help how to do like the picture above ? Thank you !! https://imgur.com/w6pouL7

Huh? Read the post and it tells you how to do it.

1 Like

I followed the steps but i want to learn me if you can , how can i make like in the picture above , i mean to see the name in game, the ID in game(the number) and players like: 1/32 . Thank you !

name = GetPlayerName(PlayerId())
id = GetPlayerServerId(PlayerId())