mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Fixed Some Bugs
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user