It seems that where is no way to get a player’s discord identifier? I hope this is a planned feature, but I was wondering if it already is, but has to be done a different way from now on?
Thank you.
Best Regards,
Badger
It seems that where is no way to get a player’s discord identifier? I hope this is a planned feature, but I was wondering if it already is, but has to be done a different way from now on?
Thank you.
Best Regards,
Badger
To my knowledge there is currently only steam and r* license identifiers for redm.
For fivem you have steam, r* license, xbl, live and discord. You dont need any patreon to unlock them, the’re all there by default
I checked all the identifiers in GetPlayerIdentifiers() for Redm, and it had all of them, but missed the discord identifier … Really hoping they get it in soon, so I can release Discord releases for Redm too
Ya I noticed that discordRPC (rich presence calls) are also not working/implemented yet. Asked about it in cfx.re discord but it seems like either nobody that is reading knows or the elements took off the holiday. I don’t blame them if they did
Would be nice to get some rough timeline or clarification of if it is planned to fix/implement discord hooks as they exist for FiveM.
Do we know if it was implemented yet hopefully?
I wonder if this is as simple as porting over the discord code from FiveM or if there are complications as to why this has not been done already by the elements.
Should probably just be a port-over I would assume
Bumping this hoping for an answer
-- Server Side
function ExtractIdentifiers(src)
local identifiers = {
steam = "",
ip = "",
discord = "",
license = "",
xbl = "",
live = ""
}
--Loop over all identifiers
for i = 0, GetNumPlayerIdentifiers(src) - 1 do
local id = GetPlayerIdentifier(src, i)
--Convert it to a nice table.
if string.find(id, "steam") then
identifiers.steam = id
elseif string.find(id, "ip") then
identifiers.ip = id
elseif string.find(id, "discord") then
identifiers.discord = id
elseif string.find(id, "license") then
identifiers.license = id
elseif string.find(id, "xbl") then
identifiers.xbl = id
elseif string.find(id, "live") then
identifiers.live = id
end
end
return identifiers
end
local srcIds = ExtractIdentifiers(source)
--srcIds.discord:gsub('discord:','')
print(srcIds.discord:gsub('discord:',''))