mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
Update functions.lua
This commit is contained in:
@@ -612,13 +612,11 @@ end
|
||||
---@param playerId string | number
|
||||
---@return boolean
|
||||
function Core.IsPlayerAdmin(playerId)
|
||||
local playerSrc = tostring(playerId)
|
||||
|
||||
if IsPlayerAceAllowed(playerSrc, "command") or GetConvar("sv_lan", "") == "true" then
|
||||
if IsPlayerAceAllowed(playerId, "command") or GetConvar("sv_lan", "") == "true" then
|
||||
return true
|
||||
end
|
||||
|
||||
local xPlayer = ESX.GetPlayerFromId(tonumber(playerId))
|
||||
local xPlayer = ESX.GetPlayerFromId(playerId)
|
||||
if not xPlayer then return false end
|
||||
|
||||
return Config.AdminGroups[xPlayer.getGroup()] or false
|
||||
|
||||
Reference in New Issue
Block a user