GENTE PRECISO DE UM ITEM QUE VOCÊ DE USE E VIRE VIP, MÃO NAO PERMANENTE, POR DIAS, MEU SISTEMA VIP E POR STORAGE A STORAGE DELE É 13540.
--- POR FAVOR ALGUEM ME AJUDAAA ---
GENTE PRECISO DE UM ITEM QUE VOCÊ DE USE E VIRE VIP, MÃO NAO PERMANENTE, POR DIAS, MEU SISTEMA VIP E POR STORAGE A STORAGE DELE É 13540.
--- POR FAVOR ALGUEM ME AJUDAAA ---
tenta isso (não testei):
function onUse(cid, item, frompos, item2, topos)
-- configs
days = 30
-- end configs
player = getPlayerByName(param)
daysvalue = days*3600*24
storageplayer = getPlayerStorageValue(player,13540)
timenow = os.time()
if storageplayer == -1 or storageplayer == 0 then
time = timenow+daysvalue
else
time = storageplayer+daysvalue
end
if isPlayer(cid) then
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")
setPlayerStorageValue(player,13540,time)
quantity = math.floor((getPlayerStorageValue(player,13540) - timenow)/(3600*24))
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.")
end
end