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

little help!

d4rkbl0od

Member
Joined
Mar 21, 2008
Messages
160
Reaction score
7
LUA:
local time = os.time(t)
       local time_remain = 7200  --2 hours ( miliseconds)
       local total_time = time + time_remain

LUA:
setPlayerStorageValue(cid, XXX, total_time)

LUA:
if os.time(t) > getPlayerStorageValue(cid, XXX) then
My question is, this script check only for system hours? or for days too? Because I would like to set an storage that will "expire" only in 1 week, the value should be 604800 or 6048 * 100, so It will work? or the script only checks the actual time, not days?
 
use os.time(), not os.time(t) as it may cause errors in some cases.

os.time() returns current unix time in seconds, and yea, it would work if current time has passed the time stored in storage value.
 
Could you explain to me in what cases the os.time(t) can cause errors?
Because I did other scripts with os.time(t), seting storage for like, 1 hour, 2 hours, 30 minutes, it can cause problems??
Ty cyko <3
 
Back
Top