Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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!
local storageNr = 12345 -- do not use 100, best use between 30100 and 65534
local neuTime = os.time() + 10*60*100
Player(cid):setStorageValue(storageNr, neuTime)
What is the problem?
By using os.time() + extra time you set the current time + de extra time as storagevalue like andypsylon posted.
Then when you check for the storagevalue, compare it with os.time(), when the extra time is over, os.time() will be higher than the storagevalue, this way you can set time based storage.
You can also use the default exhaustion functions from other servers (it works the same way). http://pastebin.com/dQR8fNwX
Code:
exhaustion.check(cid, storage) -- example: if exhaustion.check(cid, storage) then
exhaustion.get(cid, storage) -- gets the time that is left
exhaustion.set(cid, storage, time) -- time in seconds