Update functions.lua

This commit is contained in:
iSentrie
2025-03-09 23:29:52 +02:00
committed by GitHub
parent 9083a71526
commit 88a415a2b6
+2 -4
View File
@@ -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