diff --git a/locale/ExpGaming-Core/Core Help File.md b/locale/ExpGaming-Core/Core Help File.md index d82bc4d0..3e3c24bc 100644 --- a/locale/ExpGaming-Core/Core Help File.md +++ b/locale/ExpGaming-Core/Core Help File.md @@ -82,7 +82,7 @@ See code for more details. * get_ranks(part) * returns a list of all the ranks * part (opt) = part of the rank you want to return ie name -* function get_rank_presets(rank) +* get_rank_presets(rank) * returns the current rank presets * rank (opt) = rank name if only one rank is needed * get_ranked_players(rank) diff --git a/locale/ExpGaming-Core/ExpGaming - Command Maker.lua b/locale/ExpGaming-Core/ExpGaming - Command Maker.lua index 2adac1d7..4534be0d 100644 --- a/locale/ExpGaming-Core/ExpGaming - Command Maker.lua +++ b/locale/ExpGaming-Core/ExpGaming - Command Maker.lua @@ -81,7 +81,10 @@ function get_commands(rank) local rank = rank or 'Owner' local to_return = {} for _,command in pairs(global.commands) do - if command.restriction <= string_to_rank(restriction).power then table.insert(to_return,command) end + local temp_restriction = nil + if type(command.restriction) == 'number' then temp_restriction = command.restriction end + local restriction = temp_restriction or string_to_rank(command.restriction).power or 0 + if restriction > string_to_rank(rank).power then table.insert(to_return,command) end end return to_return end diff --git a/locale/ExpGaming-Core/ExpGaming - Rank Control.lua b/locale/ExpGaming-Core/ExpGaming - Rank Control.lua index c53f9105..b0027c08 100644 --- a/locale/ExpGaming-Core/ExpGaming - Rank Control.lua +++ b/locale/ExpGaming-Core/ExpGaming - Rank Control.lua @@ -123,7 +123,7 @@ end -- returns a list with every players current rank, or just the players of the rank given, includes online time function get_ranked_players(rank) local to_return = {} - for _,player in paris(game.players) do + for _,player in pairs(game.players) do if not rank or rank == get_rank(player).name then table.insert(to_return,{player.name,tick_to_display_format(player.online_time),get_rank(player).name}) end