Update admin.lua

This commit is contained in:
Jonathan Baumgardner
2018-03-12 22:41:06 -05:00
committed by GitHub
parent 2ac3c6bdc9
commit a58a5e47db

View File

@@ -8,7 +8,7 @@ Discord: https://discord.gg/r6dC2uK
]]
--Please Only Edit Below This Line-----------------------------------------------------------
commands.add_command('report', 'Reports a player', {'player','reason',true}, function(event,args)
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
@@ -19,7 +19,7 @@ commands.add_command('report', 'Reports a player', {'player','reason',true}, fun
Admin.report(player,event.player_index,reason)
end)
commands.add_command('give-warning', 'Gives a player a warning', {'player','reason',true}, function(event,args)
commands.add_command('give-warning', 'Gives a player a warning.', {'player','reason',true}, function(event,args)
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
@@ -27,7 +27,7 @@ commands.add_command('give-warning', 'Gives a player a warning', {'player','reas
Admin.give_warning(player,event.player_index,reason)
end)
commands.add_command('temp-ban', 'Temp ban a player', {'player','reason',true}, function(event,args)
commands.add_command('temp-ban', 'Temporarily ban a player.', {'player','reason',true}, function(event,args)
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
@@ -35,21 +35,21 @@ commands.add_command('temp-ban', 'Temp ban a player', {'player','reason',true},
Admin.temp_ban(player,event.player_index,reason)
end)
commands.add_command('clear-warings', 'Clears the warnings on a player', {'player'}, function(event,args)
commands.add_command('clear-warings', 'Clears the warnings on a player.', {'player'}, function(event,args)
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
Admin.clear_warings(player,event.player_index)
end)
commands.add_command('clear-reports', 'Clears the reports on a player', {'player'}, function(event,args)
commands.add_command('clear-reports', 'Clears the reports on a player.', {'player'}, function(event,args)
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
Admin.clear_reports(player,event.player_index)
end)
commands.add_command('clear-player', 'Clears reports and warnings, and removes temp-ban', {'player'}, function(event,args)
commands.add_command('clear-player', 'Clears reports and warnings, and removes temp-ban.', {'player'}, function(event,args)
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