Skymagnum

Untitled

May 1st, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1.  
  2. local money = 500
  3.  
  4. function onSay(cid, words, param)
  5.  
  6. local tab = {
  7.     ["helmet"] = {id = 2457, toid = 2491},
  8.     ["boots"] = {id = 2643, toid = 2645},
  9. }
  10.  
  11.     if tab[param] then
  12.       if doPlayerRemoveMoney(cid, money) then
  13.          if doPlayerRemoveItem(cid, tab[param].id, 1) then
  14.             doPlayerAddItem(cid, tab[param].toid, 1)
  15.                  else
  16.             doPlayerSendCancel(cid, "You don't change this item.")
  17.          end
  18.             else
  19.          doPlayerSendCancel(cid, "You don't have money.")
  20.       end
  21.     end
  22.  
  23.     return true
  24. end
Advertisement
Add Comment
Please, Sign In to add comment