Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local money = 500
- function onSay(cid, words, param)
- local tab = {
- ["helmet"] = {id = 2457, toid = 2491},
- ["boots"] = {id = 2643, toid = 2645},
- }
- if tab[param] then
- if doPlayerRemoveMoney(cid, money) then
- if doPlayerRemoveItem(cid, tab[param].id, 1) then
- doPlayerAddItem(cid, tab[param].toid, 1)
- else
- doPlayerSendCancel(cid, "You don't change this item.")
- end
- else
- doPlayerSendCancel(cid, "You don't have money.")
- end
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment