100% Working :wink:

Citizen.CreateThread(function()
	while true do
		SetDiscordAppId(000000000000) -- App ID
		SetDiscordRichPresenceAsset('Logo')
        SetDiscordRichPresenceAssetText('Server Name')
        SetDiscordRichPresenceAssetSmall('1')
		SetDiscordRichPresenceAssetSmallText('Link')
		SetDiscordRichPresenceAction(0, "🌐 Connect 🌐", "Link")
		SetDiscordRichPresenceAction(1, "📢 Discord 📢", "Link")
		Citizen.Wait(60000)
	end
end)
Citizen.CreateThread(function()
	while true do
	Citizen.Wait(10000)
		local pId = GetPlayerServerId(PlayerId())

		-- Set here the amount of slots you have (Edit if needed)
		local maxPlayerSlots = 1024

		-- For loop to get active player (Legacy method)
		players = {}
		for i = 0, 255 do
			if NetworkIsPlayerActive( i ) then
				table.insert( players, i )
			end
		end

		-- Sets the string with variables as RichPresence (Don't touch)
		SetRichPresence(string.format("Players: %s/%s | ID: %s", #players + 20, maxPlayerSlots, pId))
		
		-- It updates every one minute just in case.
		Citizen.Wait(60000)
	end
end)