mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 04:51:40 +09:00
Added Jail and Unjail
This commit is contained in:
@@ -27,6 +27,20 @@ commands.add_command('warn', 'Gives a player a warnings', {'player','reason',tru
|
|||||||
Admin.give_warning(player,event.player_index,reason)
|
Admin.give_warning(player,event.player_index,reason)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
commands.add_command('jail', 'Jails 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
|
||||||
|
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
|
||||||
|
Admin.jail(player,event.player_index,reason)
|
||||||
|
end)
|
||||||
|
|
||||||
|
commands.add_command('unjail', 'Returns the players old rank', {'player',true}, function(event,args)
|
||||||
|
local player = Game.get_player(args.player)
|
||||||
|
if not player then player_return({'commands.invalid-player',args.player}) return commands.error end
|
||||||
|
Ranking.revert(player,event.player_index)
|
||||||
|
end)
|
||||||
|
|
||||||
commands.add_command('temp-ban', 'Temp Ban A Player', {'player','reason',true}, function(event,args)
|
commands.add_command('temp-ban', 'Temp 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
|
||||||
|
|||||||
Reference in New Issue
Block a user