mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-18 22:36:03 +01:00
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:
@@ -67,12 +67,10 @@ end)
|
|||||||
-- This is used to add department drop down on the ui.
|
-- This is used to add department drop down on the ui.
|
||||||
RegisterNetEvent("ND_CharacterSelection:permsChecked")
|
RegisterNetEvent("ND_CharacterSelection:permsChecked")
|
||||||
AddEventHandler("ND_CharacterSelection:permsChecked", function(allowedRoles)
|
AddEventHandler("ND_CharacterSelection:permsChecked", function(allowedRoles)
|
||||||
for _, dept in pairs(allowedRoles) do
|
SendNUIMessage({
|
||||||
SendNUIMessage({
|
type = "givePerms",
|
||||||
type = "givePerms",
|
deptRoles = json.encode(allowedRoles)
|
||||||
deptRole = dept
|
})
|
||||||
})
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Gets all the characters and displays them on the ui.
|
-- Gets all the characters and displays them on the ui.
|
||||||
|
|||||||
Reference in New Issue
Block a user