Advertisement
LuckOake

RadBr Banishment System

Nov 3rd, 2012
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.99 KB | None | 0 0
  1. function onSay(cid, words, param)
  2. local barid = 9971 -- ID das barras para desbanir
  3.     local a = {
  4.         [1] = 20,
  5.         [2] = 40,
  6.         [3] = 60,
  7.         [4] = 90,
  8.         [5] = 120,
  9.         [6] = 150,
  10.         [7] = 250,
  11.         [8] = 350,
  12.         [9] = 500,
  13.         [10] = 750,
  14.         [11] = 999,
  15.     }
  16.    
  17.     b = a[getWarnings(param)]
  18.    
  19.         if not param then
  20.             doPlayerSendCancel(cid, "Incorrect params.") return true
  21.         elseif not getPlayerGUIDByName(param) then
  22.             doPlayerSendCancel(cid, "O jogador "..param.." não existe.") return true
  23.         elseif not isAccountBanished(getAccountIdByName(param)) then
  24.             doPlayerSendCancel(cid, "Esse jogador não está banido.") return true
  25.         elseif not doPlayerRemoveItem(cid, barid, b) then
  26.             doPlayerSendCancel(cid, "Você deve ter "..b.." gold ingots para desbanir esse jogador.") return true
  27.         end
  28.        
  29.         doRemoveAccountBanishment(getAccountIdByName(param))
  30.         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você desbaniu o jogador "..param.." pelo preço de "..b.." gold ingots.")
  31. return true
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement