Added A custom Command Prosesser and a bit more

This commit is contained in:
Cooldude2606
2017-07-10 18:47:48 +01:00
parent 770fcf28b7
commit 97d3fd0596
7 changed files with 120 additions and 55 deletions

View File

@@ -33,7 +33,10 @@ function toolbar.draw(player)
toolbar_frame.clear()
for _,btn in pairs(toolbar.buttons) do
local rank = get_rank(player)
if btn[2] >= rank.power then
local temp_restriction = nil
if type(btn[2]) == 'number' then temp_restriction = btn[2] end
local restriction = temp_restriction or string_to_rank(btn[2]).power or 0
if restriction >= rank.power then
ExpGui.add_input.draw_button(toolbar_frame,btn[1])
end
end