Added a can_open function

This commit is contained in:
Cooldude2606
2018-01-13 13:52:06 +00:00
parent 89bf049a4a
commit 059cc9a212

View File

@@ -231,5 +231,10 @@ Gui.popup.add{
direction='vertical'
}
draw_poll(flow)
end,
can_open=function(player)
if #_polls().old > 0 then return true
elseif Ranking.get_rank(player):allowed('create-poll') then return true
else return {'polls.no-poll'} end
end
}