function onSay(cid, words, param)
local t = {
['cavebot'] = {msg = 'cavebotting', n = 1}
}
local text = "The player: \'"
local p = string.explode(param, ',')
if not isPlayer(getPlayerByName(p[1])) then
return doPlayerSendCancel(cid, 'Player not found.'), TRUE
end
text = text .. p[1] .."\' has been banished by \'"..getCreatureName(cid).."\' for: \'"
if t[p[2]] == nil then
return doPlayerSendCancel(cid, 'Param not found.'), TRUE
end
text = text .. t[p[2].msg] .."\'."
if not tonumber(p[3]) or p[3] < 1 then
return doPlayerSendCancel(cid, 'Param error.'), TRUE
end
text = text .." The banishment will last for: \'"..p[3].."\' days."
db.executeQuery("INSERT INTO `bans` (id, type, value, param, active, expires, added, admin_id, comment, reason, action, statement) VALUES ();")
doBroadcastMessage(text)
return TRUE
end
Se alguém puder terminar a query pra mim agradeço, mas esta seria a base, se não tiver algum erro. (Foi feito por aqui e to muito sem tempo no momento, desculpa.)





info
Grupo: Campones
Registrado: 10/01/12
Posts: 2
Reputação: +1
Char no Tibia: Waffles
Seguinte:
Queria uma Talkaction que eu pudesse fazer o seguinte:
/ban Devil Forgotten, cave bot, 31
Ai iria aparecer uma mensagem para todos do server informando o nome do player,
o motivo,e a quantidade de dias.Seria uma Talk de ban por dias.
/ban --> Banned
Devil Forgotten --> Player
Cave Bot --> Motivo
31 --> Dias
Desde já agradeço.Não sei se aqui foi o lugar certo de postar,então se eu estiver errado
me desculpem.