function onSay(cid, words, param)
if param == "" or param == " " then
return doPlayerSendTextMessage(cid, 27, "Params needed! "..words.." [player name], [clan/rank/remove], [clan/rank value]")
end
if getPlayerGroupId(cid) ~= 6 then --n lembro se eh 5 ou 6 pra god...
return false
end
local t = string.explode(param, ",")
if not t[2] or (t[2] ~= "remove" and not t[3]) then
return doPlayerSendTextMessage(cid, 27, "Params needed! "..words.." [player name], [clan/rank/remove], [clan/rank value]")
end
local player = getPlayerByName(t[1])
if not isPlayer(player) then
return doPlayerSendTextMessage(cid, 27, "This player isn't online or doesn't exist!")
end
local choose = t[2]:lower()
local value = tonumber(t[3]) or t[3]
if choose == "clan" then
if setPlayerClan(player, value) then
return doPlayerSendTextMessage(cid, 27, "Operation completed!")
else
return doPlayerSendTextMessage(cid, 27, "This player are doing some task of rank or you choosed a invalid clan!")
end
elseif choose == "rank" then
if setPlayerClanRank(player, value) then
return doPlayerSendTextMessage(cid, 27, "Operation completed!")
else
return doPlayerSendTextMessage(cid, 27, "This player aren't in any clan or you choosed a invalid number!")
end
elseif choose == "remove" then
if removePlayerClan(player) then
return doPlayerSendTextMessage(cid, 27, "Operation completed!")
else
return doPlayerSendTextMessage(cid, 27, "This player are doing some task of rank, then you can't remove his clan!")
end
else
return doPlayerSendTextMessage(cid, 27, "Wrong choose! You need say if want change Rank, Clan or Remove!")
end
return true
end
--<talkaction words="xxxx" event="script" value="yyyy.lua"/>
achu q eh isso ae...
a ordem dos parametros eh:
"..words.." [player name], [clan/rank/remove], [clan/rank value]
exemplo:
[GOD]Ticho, clan, wingeon --deixa o god como wingeon [GOD]Ticho, rank, 5 --deixa o god rank 5 do clan q ele tiver [GOD]Ticho, remove --remove o clan atual do god






info
Grupo: Campones
Registrado: 07/02/13
Posts: 24
Reputação: 0
Char no Tibia: Wingeon
Fala galera sabem aquele comando /clan Psycraft , 5
Eu queria colocar ele no meu serve agora só para eu "ADM" Poder usar em mim e nos player tipo /Clan Psycraft , juninho, 5
Tem como vocês me arrumarem?