Added A few Edits

This commit is contained in:
Cooldude2606
2018-01-06 14:59:49 +00:00
parent dff29a66ec
commit 61110e7c11
3 changed files with 5 additions and 0 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -65,6 +65,7 @@ local function _actions(player)
'Bring',
'Jail',
'Kick',
'Temp Ban',
'Ban'
}
end