mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
fix: getting identifiers on resource start
This commit is contained in:
@@ -77,13 +77,13 @@ local function checkDiscordIdentifier(identifiers)
|
|||||||
end
|
end
|
||||||
|
|
||||||
AddEventHandler("onResourceStart", function(name)
|
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
|
for _, playerId in ipairs(GetPlayers()) do
|
||||||
local src = tonumber(playerId)
|
local src = tonumber(playerId)
|
||||||
local identifiers = getIdentifierList(src)
|
local identifiers = getIdentifierList(src)
|
||||||
PlayersInfo[src] = {
|
PlayersInfo[src] = {
|
||||||
identifiers = identifiers,
|
identifiers = identifiers,
|
||||||
discord = checkDiscordIdentifier(identifiers)
|
discord = checkDiscordIdentifier(identifiers) or {}
|
||||||
}
|
}
|
||||||
Wait(65)
|
Wait(65)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user