From 721340c0de66cd3cfb8e464bee9d003a33608934 Mon Sep 17 00:00:00 2001 From: Andyyy7666 <86536434+Andyyy7666@users.noreply.github.com> Date: Sun, 17 Jul 2022 20:15:03 +0200 Subject: [PATCH] Fixed duplicated department issue You will now receive the right permissions for the right departments without any departments messing or getting duplicated. --- ND_CharacterSelection/source/client.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ND_CharacterSelection/source/client.lua b/ND_CharacterSelection/source/client.lua index c9706c6..c5b3f46 100644 --- a/ND_CharacterSelection/source/client.lua +++ b/ND_CharacterSelection/source/client.lua @@ -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.