day por hours

Nickbhz
em Scripts

Nickbhz

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 04/01/14Posts: 320

Bom dia, alguem consegue me ajudar ? Como trocar esse script que da acesso por dia/dias para que seja feito por hora/horas ? 

8.60 / 0.4

 

-- Script Feito Por Leandro Machado
 
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
local config={
removeOnUse = "yes" -- remover quando usar ("yes" or "no")
}
 
local days = 1 -- coloque quantos dias o player terá acesso a essa área
local daysvalue = days * 24 * 60 * 60
local storageplayer = getPlayerStorageValue(cid, 19234)
local timenow = os.time()
 
if getPlayerStorageValue(cid, 19234) - os.time() <= 0 then
time = timenow + daysvalue
else
time = storageplayer + daysvalue
end
 
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você ativou ".. days .." dias de booster!")
setPlayerStorageValue(cid, 19234, time)
local quantity = math.floor((getPlayerStorageValue(cid, 19234) - timenow)/(24 * 60 * 60))
doSendMagicEffect(getPlayerPosition(cid), math.random(28,30))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de booster!")
if (config.removeOnUse == "yes") then
doRemoveItem(item.uid, 1)
end
 
return TRUE
end



Desde ja agradeço caso alguem possa dar essa ajuda!! 

Nickbhz

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 04/01/14Posts: 320

up