mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 20:41:41 +09:00
Merge branch 'pr/31'
This commit is contained in:
@@ -100,7 +100,7 @@ local function cheak_reports(player)
|
|||||||
local reports = count_reports(player)
|
local reports = count_reports(player)
|
||||||
if reports >= reports_needed_for_jail and _reports().actions[player.name] ~= 'report-jail' and Ranking.get_rank(player).group.name ~= 'Jail' then
|
if reports >= reports_needed_for_jail and _reports().actions[player.name] ~= 'report-jail' and Ranking.get_rank(player).group.name ~= 'Jail' then
|
||||||
_reports().actions[player.name] = actions.report
|
_reports().actions[player.name] = actions.report
|
||||||
Admin.jail(player,'<server>','To many user reports. Contact an Admin to be unjailed.')
|
Admin.jail(player,'<server>','Too many user reports. Contact an Admin to be unjailed.')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ function Admin.clear_warings(player,by_player,no_emit)
|
|||||||
Sync.emit_embeded{
|
Sync.emit_embeded{
|
||||||
title='Player Clear',
|
title='Player Clear',
|
||||||
color=Color.to_hex(defines.text_color.low),
|
color=Color.to_hex(defines.text_color.low),
|
||||||
description='A player had there warnings cleared.',
|
description='A player had their warnings cleared.',
|
||||||
['Player:']='<<inline>>'..player.name,
|
['Player:']='<<inline>>'..player.name,
|
||||||
['By:']='<<inline>>'..by_player_name,
|
['By:']='<<inline>>'..by_player_name,
|
||||||
}
|
}
|
||||||
@@ -193,7 +193,7 @@ function Admin.clear_reports(player,by_player,no_emit)
|
|||||||
Sync.emit_embeded{
|
Sync.emit_embeded{
|
||||||
title='Player Clear',
|
title='Player Clear',
|
||||||
color=Color.to_hex(defines.text_color.low),
|
color=Color.to_hex(defines.text_color.low),
|
||||||
description='A player had there reports cleared.',
|
description='A player had their reports cleared.',
|
||||||
['Player:']='<<inline>>'..player.name,
|
['Player:']='<<inline>>'..player.name,
|
||||||
['By:']='<<inline>>'..by_player_name,
|
['By:']='<<inline>>'..by_player_name,
|
||||||
}
|
}
|
||||||
@@ -210,7 +210,7 @@ function Admin.clear_player(player,by_player)
|
|||||||
Sync.emit_embeded{
|
Sync.emit_embeded{
|
||||||
title='Player Clear',
|
title='Player Clear',
|
||||||
color=Color.to_hex(defines.text_color.low),
|
color=Color.to_hex(defines.text_color.low),
|
||||||
description='A player had there reports and warnings cleared.',
|
description='A player had their reports and warnings cleared.',
|
||||||
['Player:']='<<inline>>'..player.name,
|
['Player:']='<<inline>>'..player.name,
|
||||||
['By:']='<<inline>>'..by_player_name,
|
['By:']='<<inline>>'..by_player_name,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Discord: https://discord.gg/r6dC2uK
|
|||||||
]]
|
]]
|
||||||
--Please Only Edit Below This Line-----------------------------------------------------------
|
--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(event)
|
||||||
local player = Game.get_player(args.player)
|
local player = Game.get_player(args.player)
|
||||||
local reason = args.reason
|
local reason = args.reason
|
||||||
@@ -41,7 +41,7 @@ commands.add_command('unjail', 'Returns the players old rank', {'player',true},
|
|||||||
Ranking.revert(player,event.player_index)
|
Ranking.revert(player,event.player_index)
|
||||||
end)
|
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 player = Game.get_player(args.player)
|
||||||
local reason = args.reason
|
local reason = args.reason
|
||||||
if not player then player_return({'commands.invalid-player',args.player}) return commands.error end
|
if not player then player_return({'commands.invalid-player',args.player}) return commands.error end
|
||||||
@@ -55,13 +55,13 @@ commands.add_command('clear-inv', 'Clears the player\'s invetory', {'player'}, f
|
|||||||
Admin.move_inventory(player)
|
Admin.move_inventory(player)
|
||||||
end)
|
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 player = Game.get_player(args.player)
|
||||||
if not player then player_return({'commands.invalid-player',args.player}) return commands.error end
|
if not player then player_return({'commands.invalid-player',args.player}) return commands.error end
|
||||||
Admin.clear_warings(player,event.player_index)
|
Admin.clear_warings(player,event.player_index)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
commands.add_command('clear-reports', 'Clears the reports from 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 player = Game.get_player(args.player)
|
||||||
if not player then player_return({'commands.invalid-player',args.player}) return commands.error end
|
if not player then player_return({'commands.invalid-player',args.player}) return commands.error end
|
||||||
Admin.clear_reports(player,event.player_index)
|
Admin.clear_reports(player,event.player_index)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Discord: https://discord.gg/r6dC2uK
|
|||||||
]]
|
]]
|
||||||
--Please Only Edit Below This Line-----------------------------------------------------------
|
--Please Only Edit Below This Line-----------------------------------------------------------
|
||||||
|
|
||||||
commands.add_command('cheat-mode', 'Toggles cheat mode for a player', {'player'}, function(event,args)
|
commands.add_command('cheat-mode', 'Toggles cheat mode for a player.', {'player'}, function(event,args)
|
||||||
local player = Game.get_player(args.player)
|
local player = Game.get_player(args.player)
|
||||||
if not player then player_return({'commands.invalid-player',args.player}) return commands.error end
|
if not player then player_return({'commands.invalid-player',args.player}) return commands.error end
|
||||||
if player.cheat_mode == true then player.cheat_mode = false else player.cheat_mode = true end
|
if player.cheat_mode == true then player.cheat_mode = false else player.cheat_mode = true end
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Discord: https://discord.gg/r6dC2uK
|
|||||||
]]
|
]]
|
||||||
--Please Only Edit Below This Line-----------------------------------------------------------
|
--Please Only Edit Below This Line-----------------------------------------------------------
|
||||||
|
|
||||||
commands.add_command('kill', 'Kills a player, must be either yourself (/kill self) or a person of a lower rank.', {'player'}, function(event,args)
|
commands.add_command('kill', 'Kills a player. Must be either yourself (/kill self) or a person of a lower rank.', {'player'}, function(event,args)
|
||||||
local _player = Game.get_player(event)
|
local _player = Game.get_player(event)
|
||||||
local player = Game.get_player(args.player)
|
local player = Game.get_player(args.player)
|
||||||
if args.player ~= 'self' and not player then player_return({'commands.invalid-player',args.player}) return commands.error end
|
if args.player ~= 'self' and not player then player_return({'commands.invalid-player',args.player}) return commands.error end
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ local disallow = {
|
|||||||
local const = 100
|
local const = 100
|
||||||
-- given const = 100: admin+ has unlimited, admin has 100, mod has 50, member has 20
|
-- given const = 100: admin+ has unlimited, admin has 100, mod has 50, member has 20
|
||||||
|
|
||||||
commands.add_command('repair', 'Repairs all destoryed and damaged entites in an area', {'range'}, function(event,args)
|
commands.add_command('repair', 'Repairs all destoryed and damaged entites in an area.', {'range'}, function(event,args)
|
||||||
local range = tonumber(args.range)
|
local range = tonumber(args.range)
|
||||||
local player = Game.get_player(event)
|
local player = Game.get_player(event)
|
||||||
local rank = Ranking.get_rank(player)
|
local rank = Ranking.get_rank(player)
|
||||||
|
|||||||
@@ -11,14 +11,14 @@ Discord: https://discord.gg/r6dC2uK
|
|||||||
local const = 20
|
local const = 20
|
||||||
-- this is the max lenth of a tag
|
-- this is the max lenth of a tag
|
||||||
|
|
||||||
commands.add_command('tag', 'Give yourself a custom tag, use /tag-clear self, to remove tag.', {'tag',true}, function(event,args)
|
commands.add_command('tag', 'Give yourself a custom tag. Use /tag-clear self to remove tag.', {'tag',true}, function(event,args)
|
||||||
local player = Game.get_player(event)
|
local player = Game.get_player(event)
|
||||||
local rank = Ranking.get_rank(player)
|
local rank = Ranking.get_rank(player)
|
||||||
if string.len(args.tag) > const then player_return({'commands.invalid-length',const}) return commands.error end
|
if string.len(args.tag) > const then player_return({'commands.invalid-length',const}) return commands.error end
|
||||||
player.tag = rank.tag..' - '..args.tag
|
player.tag = rank.tag..' - '..args.tag
|
||||||
end)
|
end)
|
||||||
|
|
||||||
commands.add_command('tag-clear', 'Removes a custom tag. Player can be self (/tag-clear self)', {'player'}, function(event,args)
|
commands.add_command('tag-clear', 'Removes a custom tag. Player can be self (/tag-clear self).', {'player'}, function(event,args)
|
||||||
local _player = Game.get_player(event)
|
local _player = Game.get_player(event)
|
||||||
local _rank = Ranking.get_rank(_player)
|
local _rank = Ranking.get_rank(_player)
|
||||||
local player = Game.get_player(args.player)
|
local player = Game.get_player(args.player)
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ Discord: https://discord.gg/r6dC2uK
|
|||||||
]]
|
]]
|
||||||
--Please Only Edit Below This Line-----------------------------------------------------------
|
--Please Only Edit Below This Line-----------------------------------------------------------
|
||||||
|
|
||||||
commands.add_command('go-to', 'Go to a player\'s location', {'player'}, function(event,args)
|
commands.add_command('go-to', 'Go to a player\'s location.', {'player'}, function(event,args)
|
||||||
local player = Game.get_player(args.player)
|
local player = Game.get_player(args.player)
|
||||||
if not player then player_return({'commands.invalid-player',args.player}) return commands.error end
|
if not player then player_return({'commands.invalid-player',args.player}) return commands.error end
|
||||||
Admin.go_to(player,event)
|
Admin.go_to(player,event)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
commands.add_command('bring', 'Bring a player to your location', {'player'}, function(event,args)
|
commands.add_command('bring', 'Bring a player to your location.', {'player'}, function(event,args)
|
||||||
local player = Game.get_player(args.player)
|
local player = Game.get_player(args.player)
|
||||||
if not player then player_return({'commands.invalid-player',args.player}) return commands.error end
|
if not player then player_return({'commands.invalid-player',args.player}) return commands.error end
|
||||||
Admin.bring(player,event)
|
Admin.bring(player,event)
|
||||||
|
|||||||
Reference in New Issue
Block a user