Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- function onSay(cid, words, param, channel)
- -- local t = param:explode(",")
- -- local name, days, coments = t[1], tonumber(t[2]), t[3]
- -- local player = getPlayerByName(name)
- -- if name then
- -- if days then
- -- local acc = getAccountIdByName(name)
- -- if acc ~= 0 then
- -- local tempo = days * 24 * 3600
- -- doAddAccountBanishment(acc, player, os.time() + tempo, 12, 2, t[3], 0)
- -- if isPlayer(player) then
- -- doRemoveCreature(player)
- -- end
- -- else
- -- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Este player não existe.")
- -- end
- -- else
- -- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode adicionar essa quantidade de dia(s) de dias de banimento.")
- -- end
- -- else
- -- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O nome do player esta incorreto.")
- -- end
- -- return true
- -- end
- function onSay(cid, words, param, channel)
- local t = string.explode(param, ",")
- --if param == '' or not days or not name or not motivo then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite /ban nome,dias,motivo.") return true end
- local name, days = t[1], tonumber(t[2])
- local motivo = t[3]
- local acc = getAccountIdByName(name)
- local target = getPlayerByName(name)
- if acc ~= 0 then
- local tempo = days * 24 * 3600
- --doAddAccountBanishment(acc, target, os.time() + tempo, 5, 2, 'Você foi banido por "..motivo..",por "..tempo.." !.', 0)
- doAddPlayerBanishment(getCreatureName(target))
- --doAddAccountBanishment(acc)
- doBroadcastMessage("O jogador ".. getCreatureName(target).. " foi banido por ".. getCreatureName(cid).. ". Motivo:\n".. motivo .. ".", 25)
- addEvent(doRemoveCreature, 3*1000, target, true)
- return true
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement