just fixed this about 2 minutes ago, i did it this way:
get all online players
check if they're administrators or nah
if they're administrators:
create a table
check the K value from the table that specifies what ranks are administrators
return that K value
insert that K value into the table and also the player entity
draw by SortedPairs() from lower to higher value
done
might not be the better way, but definitely works without any problem