diff --git a/locale/ExpGaming-Core/ExpGaming - Rank Control.lua b/locale/ExpGaming-Core/ExpGaming - Rank Control.lua index 683f3233..8afb648e 100644 --- a/locale/ExpGaming-Core/ExpGaming - Rank Control.lua +++ b/locale/ExpGaming-Core/ExpGaming - Rank Control.lua @@ -38,6 +38,13 @@ function string_to_rank(string) if #found_ranks == 1 then return found_ranks[1] end end end +-- surches the rank for a certain allow command +function rank_allowed(rank,is_allowed) + for _,allow in rank.allow do + if allow == is_allowed then return true end + end + return false +end --Send a message to all members of this rank and above, if no rank given default is mod --inv sends message to all lower ranks rather than higher function rank_print(msg, rank, inv) diff --git a/locale/ExpGaming-Core/ExpGaming - Rank Table.lua b/locale/ExpGaming-Core/ExpGaming - Rank Table.lua index a1cef53b..f29dbf9b 100644 --- a/locale/ExpGaming-Core/ExpGaming - Rank Table.lua +++ b/locale/ExpGaming-Core/ExpGaming - Rank Table.lua @@ -149,7 +149,7 @@ local ranks = { } } } --- Feed the disallows of each rank into the one below itself +-- rank table setup for n,rank in pairs(ranks.ranks) do local ranks_list = ranks.ranks rank.power = n @@ -167,13 +167,6 @@ for n,rank in pairs(ranks.ranks) do if rank.time then ranks.lowest_timed_rank=rank end ranks.number_of_ranks=ranks.number_of_ranks+1 end --- surches the rank for a certain allow command -function rank_allowed(rank,is_allowed) - for _,allow in rank.allow do - if allow == is_allowed then return true end - end - return false -end -- returns a list off all the ranks, return only one part if given function get_ranks(part) local to_return = {}