Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onUse(cid, item, fromPosition, itemEx, toPosition)
- local itemm = {
- [7366] = {point = 25},
- [11113] = {point = 20},
- [11114] = {point = 20},
- [11257] = {point = 5},
- [2300] = {point = 25},
- [8925] = {point = 25},
- [8931] = {point = 25},
- [7735] = {point = 25},
- [2469] = {point = 15},
- [2664] = {point = 15},
- [8880] = {point = 15},
- [8903] = {point = 20},
- [2501] = {point = 15},
- [2503] = {point = 15},
- [2504] = {point = 15},
- [7896] = {point = 15},
- [7902] = {point = 15},
- [8866] = {point = 15},
- [2523] = {point = 20},
- [8474] = {point = 25}
- }
- local item = getThingFromPos({x = 1001, y = 995, z = 8, stackpos = 1})
- for k, v in pairs(itemm) do
- if (item.uid ~= 0 and item.itemid == k) then
- doRemoveItem(item.uid, 1)
- db.query("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. v.point .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
- doCreatureSay(cid, "You have got rid of "..getItemNameById(k).." and you have recievd again the "..v.point.." points.", TALKTYPE_ORANGE_1)
- else
- doPlayerSendCancel(cid,"Thin isnt a donated item")
- end
- end
- end
Add Comment
Please, Sign In to add comment