potinho
Advanced OT User
Hello guys, I have a question: I have a functional script to add VIP days to a player, but when I use it I would like the days to be really added when I use a scroll, as it is, it is just replacing. If I use a 30 day scroll today and tomorrow I use a 10 day scroll, I would like to keep 40 days, but the 10 scroll replaces the 30 scroll. Could you help me?
Follow my VIP Scroll code:
Follow my VIP Scroll code:
Lua:
function onUse(cid, item, frompos, item2, topos)
if item2.itemid == 2239 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabens, voce se tornou um membro VIP do ExtremeOT por 30 dias!")
setPlayerStorageValue(cid, 30009, os.time() + 30 * 24 * 60 * 60)
doPlayerAddPremiumDays(cid, 7)
doRemoveItem(item.uid, 1)
end
return true
end