RedM Natives

SET_DISCORD_RICH_PRESENCE_ACTION

Sets a clickable button to be displayed in a player's Discord rich presence.

Hash0xCBBC3FAC
Runtime nameSetDiscordRichPresenceAction
NamespaceCFX
SideClient
NameOfficial
Docs

Signature

void SET_DISCORD_RICH_PRESENCE_ACTION(int index, char* label, char* url);

Parameters

NameTypeDescription
indexint

The button index, either 0 or 1.

labelchar*

The text to display on the button.

urlchar*

The URL to open when clicking the button. This has to start with fivem://connect/ or https://.

Returns void

Description

Cfx.re native reference

Sets a clickable button to be displayed in a player's Discord rich presence.

Usage

Lua
SetDiscordRichPresenceAction(index, label, url)

-- always works, by hash
Citizen.InvokeNative(0xcbbc3fac, index, label, url)
JavaScript and C#
JavaScript
SetDiscordRichPresenceAction(index, label, url);

// by hash
Citizen.invokeNative('0xcbbc3fac', index, label, url);
C#
Function.Call((Hash)0xcbbc3fac, index, label, url);

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.