Fixed duplicated department issue

You will now receive the right permissions for the right departments without any departments messing or getting duplicated.
This commit is contained in:
Andyyy7666
2022-07-17 20:15:03 +02:00
committed by GitHub
parent d5040e06b7
commit 721340c0de

View File

@@ -67,12 +67,10 @@ end)
-- This is used to add department drop down on the ui.
RegisterNetEvent("ND_CharacterSelection:permsChecked")
AddEventHandler("ND_CharacterSelection:permsChecked", function(allowedRoles)
for _, dept in pairs(allowedRoles) do
SendNUIMessage({
type = "givePerms",
deptRole = dept
})
end
SendNUIMessage({
type = "givePerms",
deptRoles = json.encode(allowedRoles)
})
end)
-- Gets all the characters and displays them on the ui.