diff --git a/Addons/Admin/admin.lua b/Addons/Admin/admin.lua index c26e0d37..7d33069e 100644 --- a/Addons/Admin/admin.lua +++ b/Addons/Admin/admin.lua @@ -49,6 +49,7 @@ end function Admin.take_action(action,player,by_player,reason) if action == 'Ban' then Admin.ban(player,by_player,reason) + elseif action == 'Temp Ban' and Admin.temp_ban then Admin.temp_ban(player,by_player,reason) elseif action == 'Kick' then Admin.kick(player,by_player,reason) elseif action == 'Jail' then Admin.jail(player,by_player,reason) elseif action == 'Go To' then Admin.go_to(player,by_player) diff --git a/Addons/Commands/admin.lua b/Addons/Commands/admin.lua index 258c6cd1..90134d8c 100644 --- a/Addons/Commands/admin.lua +++ b/Addons/Commands/admin.lua @@ -9,10 +9,13 @@ Discord: https://discord.gg/r6dC2uK --Please Only Edit Below This Line----------------------------------------------------------- commands.add_command('report', 'Reports a player', {'player','reason',true}, function(event,args) + local _player = Game.get_player(event) local player = Game.get_player(args.player) local reason = args.reason if not player then player_return({'commands.invalid-player',args.player}) return commands.error end if Ranking.get_rank(player):allowed('no-report') or Admin.is_banned(player) then player_return({'reports.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({'reports.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({'reports.cant-report',args.player}) return commands.error end end Admin.report(player,event.player_index,reason) end) diff --git a/Addons/Guis/admin-gui.lua b/Addons/Guis/admin-gui.lua index 525e91ce..de61f1d6 100644 --- a/Addons/Guis/admin-gui.lua +++ b/Addons/Guis/admin-gui.lua @@ -65,6 +65,7 @@ local function _actions(player) 'Bring', 'Jail', 'Kick', + 'Temp Ban', 'Ban' } end