diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 2a57fc0f..447a3e51 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -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