mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
Removed Some Prints lmao
This commit is contained in:
@@ -52,13 +52,10 @@ AddEventHandler("ND_CharacterSelection:checkPerms", function()
|
|||||||
local player = source
|
local player = source
|
||||||
local discordUserId = NDCore.Functions.GetPlayerIdentifierFromType("discord", player):gsub("discord:", "")
|
local discordUserId = NDCore.Functions.GetPlayerIdentifierFromType("discord", player):gsub("discord:", "")
|
||||||
local allowedRoles = {}
|
local allowedRoles = {}
|
||||||
print("test")
|
|
||||||
local discordInfo = NDCore.Functions.GetUserDiscordInfo(discordUserId)
|
local discordInfo = NDCore.Functions.GetUserDiscordInfo(discordUserId)
|
||||||
print(discordInfo)
|
|
||||||
-- Check if the players discord roles will grant them permission to the department.
|
-- Check if the players discord roles will grant them permission to the department.
|
||||||
for dept, roleTable in pairs(config.departments) do
|
for dept, roleTable in pairs(config.departments) do
|
||||||
for _, roleId in pairs(roleTable) do
|
for _, roleId in pairs(roleTable) do
|
||||||
print(roleId)
|
|
||||||
if roleId == 0 or roleId == "0" or (discordInfo and discordInfo.roles[roleId]) then
|
if roleId == 0 or roleId == "0" or (discordInfo and discordInfo.roles[roleId]) then
|
||||||
table.insert(allowedRoles, dept)
|
table.insert(allowedRoles, dept)
|
||||||
end
|
end
|
||||||
@@ -66,4 +63,4 @@ AddEventHandler("ND_CharacterSelection:checkPerms", function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
TriggerClientEvent("ND_CharacterSelection:permsChecked", player, allowedRoles)
|
TriggerClientEvent("ND_CharacterSelection:permsChecked", player, allowedRoles)
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user