Added ExpGamingAdmin

This commit is contained in:
Cooldude2606
2018-08-26 17:28:18 +01:00
parent 121d983b08
commit 95233ebb40
48 changed files with 1410 additions and 604 deletions

View File

@@ -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({'reports.cant-report-ban',args.player}) return commands.error end
if Admin.is_banned(player) then player_return({'ExpGamingAdmin@4-0-0.cant-report-ban',args.player}) return commands.error end
Admin.move_inventory(player)
end)

View File

@@ -11,7 +11,7 @@ commands.add_command('jail', 'Jails a player', {
}, function(event,args)
local player = args.player
local reason = args.reason
if Ranking.get_rank(player):allowed('no-report') then player_return({'reports.cant-report',args.player}) return commands.error end
if Ranking.get_rank(player):allowed('no-report') then player_return({'ExpGamingAdmin@4-0-0.cant-report',args.player}) return commands.error end
if Admin.is_banned(player) then player_return({'commands.cant-report-ban',args.player}) return commands.error end
Admin.jail(player,event.player_index,reason)
end)

View File

@@ -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({'reports.cant-report-ban',args.player}) return commands.error end
if Ranking.get_rank(player):allowed('no-report') 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
if Admin.is_banned(player) then player_return({'ExpGamingAdmin@4-0-0.cant-report-ban',args.player}) return commands.error end
if Ranking.get_rank(player):allowed('no-report') then player_return({'ExpGamingAdmin@4-0-0.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@4-0-0.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@4-0-0.cant-report',args.player}) return commands.error end end
Admin.report(player,event.player_index,reason)
end)

View File

@@ -10,15 +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) then player_return({'reports.cant-report-ban',args.player}) return commands.error end
if Admin.is_banned(player) then player_return({'ExpGamingAdmin@4-0-0.cant-report-ban',args.player}) return commands.error end
Admin.temp_ban(player,event.player_index,reason)
end)
--- Used to clear all parts of a player, removing warnings, reports, jail and temp ban
-- @command clear-all
-- @param player the player to clear
commands.add_command('clear-all', 'Clears a player of any temp-ban, reports or warnings', {
['player']={true,'player'}
}, function(event,args)
Admin.clear_player(args.player,event.player_index)
end)

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({'reports.cant-report-ban',args.player}) return commands.error end
if Ranking.get_rank(player):allowed('no-report') then player_return({'reports.cant-report',args.player}) return commands.error end
if Admin.is_banned(player) then player_return({'ExpGamingAdmin@4-0-0.cant-report-ban',args.player}) return commands.error end
if Ranking.get_rank(player):allowed('no-report') then player_return({'ExpGamingAdmin@4-0-0.cant-report',args.player}) 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({'reports.cant-report-ban',args.player}) return commands.error end
if Admin.is_banned(player) then player_return({'ExpGamingAdmin@4-0-0.cant-report-ban',args.player}) return commands.error end
Admin.clear_warings(player,event.player_index)
end)