• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

storage for time

Elexonic

Well-Known Member
Joined
Jun 18, 2008
Messages
1,920
Reaction score
59
Need set player storage with an object .. but I want that last one hour storage. and that when you remove the storage to that player.
as serious?

i made this script.. but don`t work.. i think.. no remove storage..

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
 
 local config = {
        exhaustionInSeconds = 3,
        storage = 11551
}

		if exhaustion.check(cid, config.storage) == false then
			exhaustion.set(cid, config.storage, config.exhaustionInSeconds * 60)
			local animText = math.random(1,200)
			doSendMagicEffect(fromPosition, 10) 
			doSendAnimatedText(fromPosition, '!Bonus Vip Access!', animText) 
			
	
		else
		doPlayerSendCancel(cid, "You bonus for vip access is still active  " .. config.exhaustionInSeconds .. " seconds.")
		end
return true
end
 
This script is 3 min, but what exactly doesn't work? If you use the script, you keep getting the cancel message no mather how long you wait? and do you got any errors in console?
 
i using this script..

function onUse(cid, item, fromPosition, itemEx, toPosition)
local daysvalue = 1 * 60 * 1000
local daily = getPlayerStorageValue(cid, 11551)
if (daily == -1) then
daily = 0
end
if getPlayerStorageValue(cid, 11551) - os.time() <= 0 then
doPlayerAddItem(cid, 2160, 1)
time = os.time() + daysvalue
setPlayerStorageValue(cid, 11551, time)
setPlayerStorageValue(cid, 11551, daily+1)
local daily = getPlayerStorageValue(cid, 11551)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You done your " .. daily .. " Daily Quest. You got 1 cc.")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You must wait 24 Hours to get your daily quest. Next avaiable will be at: " .. os.date("%H:%M:%S", getPlayerStorageValue(cid, 11551)) .. ".")
end
return true
end

Needd this action set player storage for 1 hour.. and after 1 hour.. this storage removed.. from player..

no get error to my... only no remove storage..

- - - Updated - - -

I solved this .
thanks for help!
can close this
 
Last edited:
Back
Top