YU

Item Que Vira Vip.

Por yuridadesi, 23 de jun. de 2011 em Archived

2
694
yuridadesiY
23 de junho de 2011 às 18:43

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 ---

BodyGriloB
24 de junho de 2011 às 00:32

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