forked from Simnation/Main
ed
This commit is contained in:
parent
55adb0ec7f
commit
1f0a23516e
46 changed files with 2671 additions and 9 deletions
25
resources/[housing]/brutal_keys/sv_utils.lua
Normal file
25
resources/[housing]/brutal_keys/sv_utils.lua
Normal file
|
@ -0,0 +1,25 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue