Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. -- function onSay(cid, words, param, channel)
  2. -- local t = param:explode(",")
  3. -- local name, days, coments = t[1], tonumber(t[2]), t[3]
  4. -- local player = getPlayerByName(name)
  5. -- if name then
  6. -- if days then
  7. -- local acc = getAccountIdByName(name)
  8. -- if acc ~= 0 then
  9. -- local tempo = days * 24 * 3600
  10. -- doAddAccountBanishment(acc, player, os.time() + tempo, 12, 2, t[3], 0)
  11. -- if isPlayer(player) then
  12. -- doRemoveCreature(player)
  13. -- end
  14. -- else
  15. -- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Este player não existe.")
  16. -- end
  17. -- else
  18. -- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode adicionar essa quantidade de dia(s) de dias de banimento.")
  19. -- end
  20. -- else
  21. -- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O nome do player esta incorreto.")
  22. -- end
  23. -- return true
  24. -- end
  25.  
  26. function onSay(cid, words, param, channel)
  27.  
  28.  
  29. local t = string.explode(param, ",")
  30. --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
  31. local name, days = t[1], tonumber(t[2])
  32. local motivo = t[3]
  33. local acc = getAccountIdByName(name)
  34. local target = getPlayerByName(name)
  35. if acc ~= 0 then
  36. local tempo = days * 24 * 3600
  37. --doAddAccountBanishment(acc, target, os.time() + tempo, 5, 2, 'Você foi banido por "..motivo..",por "..tempo.." !.', 0)
  38. doAddPlayerBanishment(getCreatureName(target))
  39. --doAddAccountBanishment(acc)
  40. doBroadcastMessage("O jogador ".. getCreatureName(target).. " foi banido por ".. getCreatureName(cid).. ". Motivo:\n".. motivo .. ".", 25)
  41. addEvent(doRemoveCreature, 3*1000, target, true)
  42. return true
  43. end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement