Skip to content

Commit 863bc4d

Browse files
authored
Fix the error causing the function to always return false.
Fix the error causing the function always returning false if player doesn't have access to all commands. The key in the players table should be a number not a string, it caused the function to return false even if the group is in config.
1 parent 74e76ed commit 863bc4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

[core]/es_extended/server/functions.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ end
612612
---@param playerId string | number
613613
---@return boolean
614614
function Core.IsPlayerAdmin(playerId)
615-
playerId = tostring(playerId)
615+
playerId = tonumber(playerId)
616616
if (IsPlayerAceAllowed(playerId, "command") or GetConvar("sv_lan", "") == "true") then
617617
return true
618618
end

0 commit comments

Comments
 (0)