Fixed some bugs

This commit is contained in:
Cooldude2606
2017-12-10 14:42:26 +00:00
parent 788cbfa248
commit 38cc62e4bb
4 changed files with 51 additions and 29 deletions

View File

@@ -80,8 +80,8 @@ end
local function run_custom_command(command)
local command_data = command_data[command.name]
local player_name = Game.get_player(commnd) and Game.get_player(commnd).name or 'server'
-- is the player allowed to use this command
if is_type(Ranking,'table') and is_type(Ranking.rank_allowed,'function') and not Ranking.rank_allowed(Ranking.get_rank(command.player_index),command.name) then
-- is the player allowed to use this command
if is_type(Ranking,'table') and is_type(Ranking.get_rank,'function') and not Ranking.get_rank(player_name):allowed(command.name) then
player_return{'commands.unauthorized'}
game.write_file('commands.log','\n'..game.tick
..' Player: '..player_name