From 33098d19bae45fcf6b7a4b5f7a1af07f181d16b0 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Sun, 4 Jun 2017 20:07:32 +0100 Subject: [PATCH] Forgot the return and added limt on leanth of cTag --- control.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/control.lua b/control.lua index e210b44f..ba0d7224 100644 --- a/control.lua +++ b/control.lua @@ -640,7 +640,7 @@ function commandInit() if event.parameter then else return end local args = {} for word in event.parameter:gmatch('%S+') do table.insert(args,word) end if #args == 1 then else return end - local player = game.players[args[1]] if player then else end + local player = game.players[args[1]] if player then else return end if player.permission_group.name == 'Jail' then revertRank(player,byPlayer) end end end) @@ -650,12 +650,13 @@ function commandInit() local byPlayer = game.players[event.player_index] local tag = nil if event.parameter then tag = event.parameter end + if tag and tag:len() > 20 then byPlayer.print('Invaild Tag, must be less then 20 characters') return end if tag then byPlayer.tag = '[cTag] - '..tag..' ' else byPlayer.tag = getRank(byPlayer).tag end else if event.parameter then else return end local args = {} for word in event.parameter:gmatch('%S+') do table.insert(args,word) end if #args > 0 then else return end - local player = game.players[args[1]] if player then else end + local player = game.players[args[1]] if player then else return end if args[2] then player.tag = '[cTag] - '..table.concat(args,' ',2)..' ' else player.tag = getRank(player).tag end end end)