silveralol
Advanced OT User
- Joined
- Mar 16, 2010
- Messages
- 1,480
- Solutions
- 9
- Reaction score
- 212
hello folks, I'm working on something that uses timer
I set storage to the player
so, I want the time left
and send it to player
something like:
thanks
I set storage to the player
Code:
player:setStorageValue(key, os.time() + 20 * 60 * 1000)
Code:
local timeLeft = player:getStorageValue(key) - os.time()
something like:
Code:
player:sendTextMessage('Time Left: 13 minutes and 20 seconds' , MESSAGE_EVENT_ADVANCE)
or
player:sendTextMessage('Time Left: 30 seconds' , MESSAGE_EVENT_ADVANCE)