Fixed Cant Report Error

This commit is contained in:
Cooldude2606
2018-11-09 15:54:29 +00:00
parent 5426843a45
commit 5660cf1864
5 changed files with 12 additions and 12 deletions

View File

@@ -11,8 +11,8 @@ commands.add_command('warn', 'Gives a player a warning', {
}, function(event,args)
local player = args.player
local reason = args.reason
if Admin.is_banned(player) then player_return{'ExpGamingAdmin.cant-report-ban',args.player} return commands.error end
if Role.has_flag(player,'not_reportable') then player_return{'ExpGamingAdmin.cant-report',args.player} return commands.error end
if Admin.is_banned(player) then player_return{'ExpGamingAdmin.cant-report-ban',args.player.name} return commands.error end
if Role.has_flag(player,'not_reportable') then player_return{'ExpGamingAdmin.cant-report',args.player.name} return commands.error end
Admin.give_warning(player,event.player_index,reason)
end)
@@ -23,6 +23,6 @@ commands.add_command('clear-warnings', 'Clears a player\'s warnings', {
['player'] = {true,'player'}
}, function(event,args)
local player = args.player
if Admin.is_banned(player) then player_return({'ExpGamingAdmin.cant-report-ban',args.player}) return commands.error end
if Admin.is_banned(player) then player_return({'ExpGamingAdmin.cant-report-ban',args.player.name}) return commands.error end
Admin.clear_warings(player,event.player_index)
end)