1
0
Fork 0
forked from Simnation/Main
Main/resources/[housing]/brutal_keys/sv_utils.lua

25 lines
719 B
Lua
Raw Normal View History

2025-07-09 21:31:55 +02:00
function StaffCheck(source)
local staff = false
if Config.Core:upper() == 'ESX'then
local player = Core.GetPlayerFromId(source)
local playerGroup = player.getGroup()
for i, Group in ipairs(Config.AdminGroups) do
if playerGroup == Group then
staff = true
break
end
end
elseif Config.Core:upper() == 'QBCORE' then
for i, Group in ipairs(Config.AdminGroups) do
if Core.Functions.HasPermission(source, Group) or IsPlayerAceAllowed(source, Group) or IsPlayerAceAllowed(source, 'command') then
staff = true
break
end
end
end
return staff
end