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.)
Ex: Colaborador de Scripting
Contato: bepokemon@hotmail.com