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

Lua Finding time left in script countdown

Grehy

Killroy
Joined
Nov 21, 2008
Messages
2,631
Reaction score
33
Location
United States
When using this object, I add a 60 second cool-down to it with this;

Lua:
setGlobalStorageValue(45000, os.time() + 60)

To check if the cool-down is over, I use this;

Lua:
if getGlobalStorageValue(45000) >= os.time() then
		doPlayerPopupFYI(cid, "The crane can only be used every 60 seconds.")
		return false
	end

But what can I do to find out how many seconds are remaining? Thank you
 

Similar threads

Back
Top