This lightweight Lua script integrates your FiveM server with Discord Rich Presence, displaying server-specific details such as:
- 🖼️ Custom Asset Image
- ⏳ Queue Status
- 👥 Current Player Count
- 🔧 Fully Configurable via
config.lua
Here's a preview of the Discord Rich Presence integration in action:
- Customizable Discord application assets
- Real-time display of:
- Server name
- Current players / max players
- Queue position (if applicable)
- Works entirely in Lua
- Easy setup and deployment
- FiveM server with citizenfx compatibility
- Discord Developer Portal application (for assets and client ID)
Edit the config.lua file to match your server and Discord settings.
Config = {}
---------------------------
-- Discord Rich Presence --
---------------------------
Data = {
enabled = false, -- Set to false to disable Discord Rich Presence
appId = '', -- Discord Application ID Here For Your Bot
asset = '', -- Upload Your Logo Here
text = 'Players: %s/250', -- | Queue: %s', Unhash If Using Queue Export Below
smallText = '', -- Server Name
queueExport = function ()
return --exports['svdden_queue']:getQueueCount() Change To Your Queue Export And Unhash above!
end,
actions = {
{ 'Discord', 'https://discord.gg/changeme' }, -- Link 1
{ 'Shop Now', 'https://changeme.org/' } -- Link 2
}
}