fix: getting identifiers on resource start

This commit is contained in:
Andy
2023-12-03 16:43:51 +01:00
committed by GitHub
parent 0df4077bfe
commit 6f4f94df96

View File

@@ -77,13 +77,13 @@ local function checkDiscordIdentifier(identifiers)
end
AddEventHandler("onResourceStart", function(name)
if name ~= resourceName or Config.discordBotToken == "false" or Config.discordGuildId == "false" then return end
if name ~= resourceName then return end
for _, playerId in ipairs(GetPlayers()) do
local src = tonumber(playerId)
local identifiers = getIdentifierList(src)
PlayersInfo[src] = {
identifiers = identifiers,
discord = checkDiscordIdentifier(identifiers)
discord = checkDiscordIdentifier(identifiers) or {}
}
Wait(65)
end