Update main.lua

This commit is contained in:
Andyyy7666
2022-02-26 16:42:48 +01:00
committed by GitHub
parent 6f0fd87219
commit c3a1209c55

View File

@@ -88,7 +88,14 @@ end
RegisterNetEvent("checkPerms")
AddEventHandler("checkPerms", function(role)
local player = source
local rolePermission = IsRolePresent(player, role, config.departments)
local rolePermission = false
for i = 1, #config.departments[role] do
rolePermission = IsRolePresent(player, role, config.departments[role][i], "start")
if rolePermission then
print(rolePermission)
break
end
end
TriggerClientEvent("permsChecked", player, role, rolePermission)
end)