mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Update tags.lua
This commit is contained in:
committed by
GitHub
parent
deeec00241
commit
af6c28da60
@@ -11,14 +11,14 @@ Discord: https://discord.gg/r6dC2uK
|
||||
local const = 20
|
||||
-- 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 rank = Ranking.get_rank(player)
|
||||
if string.len(args.tag) > const then player_return({'commands.invalid-length',const}) return commands.error end
|
||||
player.tag = rank.tag..' - '..args.tag
|
||||
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 _rank = Ranking.get_rank(_player)
|
||||
local player = Game.get_player(args.player)
|
||||
@@ -27,4 +27,4 @@ commands.add_command('tag-clear', 'Removes a custom tag. Player can be self (/ta
|
||||
if args.player == 'self' or _player.name == player.name then _player.tag = _rank.tag
|
||||
elseif _rank.power < rank.power then player.tag = rank.tag
|
||||
else player_return({'commands.unauthorized'}) return commands.error end
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user