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

Help on time lua

PietroGuimaraes

New Member
Joined
Aug 17, 2016
Messages
3
Reaction score
0
And then guys beauty? So I would like to remedy a doubt with you here!

I'm putting together an event, and the player is in a room for 5 minutes. This part is already done, I just need your help in the following:

16:38 Attention! You have (05:00) minutes remaining.

Oh what happens, he saw subtracting seconds every 10 seconds, thus:

Code:
16:38 Attention! You have (04:50) minutes remaining.
16:38 Attention! You have (04:40) minutes remaining.
16:38 Attention! You have (04:30) minutes remaining.
....
16:38 Attention! You have (03:50) minutes remaining.
16:38 Attention! You have (03:40) minutes remaining.
16:38 Attention! You have (03:30) minutes remaining.
....
16:38 Attention! You have (02:50) minutes remaining.
16:38 Attention! You have (02:40) minutes remaining.
16:38 Attention! You have (02:30) minutes remaining.
....
16:38 Attention! You have (01:50) minute remaining.
16:38 Attention! You have (01:40) minute remaining.
16:38 Attention! You have (01:30) minute remaining.

is a countdown from 05:00 to 00:00
Can anyone help me on this?
I thank you!
 
Show the script
I use this function in my script..
Code:
local playerz = Player(tostring(msg))
    function countDown(delay)
    if delay ~= 1 then
        addEvent(countDown, 60 * 1000, delay - 1)
    end
    if not playerz then
        return true
    end
            playerz:sendChannelMessage("[Event]", "Attention! You have("..delay.. ":00) minute" .. (delay > 1 and "s" or "") .. " remaining.", TALKTYPE_CHANNEL_O, 10)
it works great, but i need the modification
 
Back
Top