Added some get commands

This commit is contained in:
Cooldude2606
2017-08-20 20:26:06 +01:00
parent 75e3c904f0
commit 3a5c73f0a0
5 changed files with 44 additions and 3 deletions

View File

@@ -140,6 +140,14 @@ for n,rank in pairs(ranks) do
end
end
end
-- returns a list off all the ranks, return only one part if given
function get_ranks(part)
local to_return = {}
if part then
for _,rank in pairs(global.ranks) do table.insert(to_return,rank[part]) end
else to_return = global.ranks end
return to_return
end
-- Move the ranks to the global array
Event.register(-1,function() global.ranks = ranks end)
--Please Only Edit Above This Line-----------------------------------------------------------