Two presence profiles
Edit Config.Presence in config.lua. Players use one of two profiles:
| Profile | Shown | Large image |
|---|---|---|
Selection | During the loading screen and the character menu | Your logo |
Playing | Once a character is loaded | The character's photo |
Config.Presence = {
ShowJob = false,
ShowLocation = false,
RefreshInterval = 15,
RotationInterval = 10,
Selection = {
LargeImageText = '{server_name}',
Messages = {
'In character selection',
'{player_count}/{max_players} players online',
},
},
Playing = {
LargeImageText = '{char_name}',
Messages = {
'{char_name}',
'{char_name} | {job} - {job_grade}',
'Near {street}, {zone}',
'{player_count}/{max_players} players | ID {player_id}',
},
},LargeImageText is shown when someone hovers over the large image.
Placeholders
Use these in messages, LargeImageText, SmallImage.Text and button labels:
| Placeholder | Shows |
|---|---|
{server_name} | Config.ServerName |
{player_count} | Players currently online |
{max_players} | Your sv_maxclients value |
{player_id} | The player's server ID |
{char_name} | Character first and last name |
{job} | Job label, only with ShowJob = true |
{job_grade} | Job grade label, only with ShowJob = true |
{street} | Current street, only with ShowLocation = true |
{zone} | Current area, such as Vinewood or Sandy Shores, only with ShowLocation = true |
Showing jobs
The job is off by default, because it tells everyone who sees a player's Discord profile what their character does, including jobs such as police that players may prefer to keep in character.
Config.Presence = {
ShowJob = false,While it is off, job and rank are never sent to Discord, and any message using {job} or {job_grade} is skipped, so the default {char_name} | {job} - {job_grade} message simply does not appear. Set it to true to show the job. Rename jobs only has an effect while it is on.
Showing where players are
Location is off by default, because it tells everyone who sees a player's Discord profile where that character is in the city.
Config.Presence = {
ShowLocation = false,While it is off, street and zone are never sent to Discord, and any message using {street} or {zone} is skipped, so the default Near {street}, {zone} message simply does not appear. Set it to true to show location.
Rotation and refresh
- When a profile has more than one message, they rotate every
RotationIntervalseconds. Set it to0to always show the first message. - The presence refreshes every
RefreshIntervalseconds (15 by default), so player count and, when they are on, job and location stay current. Character loads, job changes and new photos appear immediately. - Both intervals have a minimum of 5 seconds.
- Text longer than 128 characters is shortened, which is Discord's limit.
Fallback text
When a value is not available, the matching fallback is shown instead:
Fallbacks = {
char_name = 'Unknown',
job = 'Unemployed',
job_grade = 'None',
street = 'Unknown street',
zone = 'San Andreas',
},Rename jobs
Use JobLabels to show a different name for a job, using the job's internal name as the key:
JobLabels = {
unemployed = 'Civilian',
police = 'LSPD',
},Server name
Config.ServerName fills {server_name} and is used as the title of player notifications. The name next to "Playing" on Discord comes from your Discord application name instead.
Temporary messages
Other resources can show a temporary message, such as during a heist or a race, with the SetPresenceOverride export. See Exports & integrations.