A little script for discord bot for tag player doing something in server and send message to discord server
Not use Database, I hate it
little code, you can use function or RegisterServerEvent to create file
server.lua
local discord = ""
local id = ""
identifiers = GetNumPlayerIdentifiers(source)
for i = 0, identifiers + 1 do
if GetPlayerIdentifier(source, i) ~= nil then
if string.match(GetPlayerIdentifier(source, i), "discord") then
discord = GetPlayerIdentifier(source, i)
id = string.sub(discord, 9, -1)
end
end
end
fxmanifest.lua
fx_version 'bodacious'
game 'gta5'
client_scripts {
'server.lua',
}
Review:
Have Fun!