diff --git a/modules/ExpGamingAdmin/Commands/src/clear.lua b/modules/ExpGamingAdmin/Commands/src/clear.lua index efb99637..ec6262a7 100644 --- a/modules/ExpGamingAdmin/Commands/src/clear.lua +++ b/modules/ExpGamingAdmin/Commands/src/clear.lua @@ -7,6 +7,6 @@ commands.add_command('clear-inv', 'Clears a player\'s invetory', { ['player'] = {true,'player-rank'} }, 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.move_inventory(player) end) diff --git a/modules/ExpGamingAdmin/Commands/src/jail.lua b/modules/ExpGamingAdmin/Commands/src/jail.lua index 80017eb4..87163faa 100644 --- a/modules/ExpGamingAdmin/Commands/src/jail.lua +++ b/modules/ExpGamingAdmin/Commands/src/jail.lua @@ -11,8 +11,8 @@ commands.add_command('jail', 'Jails a player', { }, function(event,args) local player = args.player local reason = args.reason - 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{'ExpGamingCore_Command.cant-report-ban',args.player} return commands.error end + if Role.has_flag(player,'not_reportable') then player_return{'ExpGamingAdmin.cant-report',args.player.name} return commands.error end + if Admin.is_banned(player) then player_return{'ExpGamingCore_Command.cant-report-ban',args.player.name} return commands.error end Admin.jail(player,event.player_index,reason) end) @@ -23,6 +23,6 @@ commands.add_command('unjail', 'Returns a player\'s old rank', { ['player']={true,'player'} }, function(event,args) local player = args.player - if Admin.is_banned(player,true) ~= 'jail' then player_return({'ExpGamingCore_Command.cant-report-ban',args.player}) return commands.error end + if Admin.is_banned(player,true) ~= 'jail' then player_return({'ExpGamingCore_Command.cant-report-ban',args.player.name}) return commands.error end Server.interface(Role.revert,true,player,event.player_index,2) end) \ No newline at end of file diff --git a/modules/ExpGamingAdmin/Commands/src/reports.lua b/modules/ExpGamingAdmin/Commands/src/reports.lua index 0355c514..4e8dbd4d 100644 --- a/modules/ExpGamingAdmin/Commands/src/reports.lua +++ b/modules/ExpGamingAdmin/Commands/src/reports.lua @@ -12,10 +12,10 @@ commands.add_command('report', 'Reports a player', { local _player = Game.get_player(event) 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 - for _,report in pairs(global.addons.reports.reports) do if report[1] == _player.name then player_return({'ExpGamingAdmin.cant-report',args.player}) return commands.error end end - for _,report in pairs(global.addons.reports.varified) do if report[1] == _player.name then player_return({'ExpGamingAdmin.cant-report',args.player}) return commands.error end 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 + for _,report in pairs(global.addons.reports.reports) do if report[1] == _player.name then player_return({'ExpGamingAdmin.cant-report',args.player.name}) return commands.error end end + for _,report in pairs(global.addons.reports.varified) do if report[1] == _player.name then player_return({'ExpGamingAdmin.cant-report',args.player.name}) return commands.error end end Admin.report(player,event.player_index,reason) end) diff --git a/modules/ExpGamingAdmin/Commands/src/tempban.lua b/modules/ExpGamingAdmin/Commands/src/tempban.lua index 00e8b43c..8657d1ad 100644 --- a/modules/ExpGamingAdmin/Commands/src/tempban.lua +++ b/modules/ExpGamingAdmin/Commands/src/tempban.lua @@ -10,6 +10,6 @@ commands.add_command('temp-ban', 'Temporarily ban a player', { }, function(event,args) local player = args.player local reason = args.reason - if Admin.is_banned(player) and Admin.is_banned(player,true) ~= 'jail' then player_return({'ExpGamingAdmin.cant-report-ban',args.player}) return commands.error end + if Admin.is_banned(player) and Admin.is_banned(player,true) ~= 'jail' then player_return({'ExpGamingAdmin.cant-report-ban',args.player.name}) return commands.error end Admin.temp_ban(player,event.player_index,reason) end) \ No newline at end of file diff --git a/modules/ExpGamingAdmin/Commands/src/warnings.lua b/modules/ExpGamingAdmin/Commands/src/warnings.lua index 02b548e5..f962d696 100644 --- a/modules/ExpGamingAdmin/Commands/src/warnings.lua +++ b/modules/ExpGamingAdmin/Commands/src/warnings.lua @@ -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) \ No newline at end of file