|
| 10 Mar 2017 04:53 PM |
How would I make it in a script so that it will format a timer like this : "15:00" and make it countdown?
I will really appreciate it if you help. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 10 Mar 2017 04:57 PM |
oh also I will need help with getting a table from a table.
Like this
local tbl = { LOL = { "Hi", "Omg" } } |
|
|
| Report Abuse |
|
|
|
| 10 Mar 2017 04:57 PM |
| I will appreciate that also. |
|
|
| Report Abuse |
|
|
| |
|
|
| 10 Mar 2017 04:59 PM |
| First one is for seconds, second for minutes. |
|
|
| Report Abuse |
|
|
| |
|
|
| 10 Mar 2017 05:01 PM |
So like this?
local roundtime = 15
for timer = roundtime*60,0,-1 do print(timer%60/60)%60 wait(1) end |
|
|
| Report Abuse |
|
|
|
| 10 Mar 2017 05:02 PM |
This is what I do:
local function timez(timeleft) local sec = math.floor((timeleft%60)) if sec < 10 and sec >= 0 then sec = ('0'..sec) end local min = math.floor(((timeleft/60)%60)) return(min..':'..sec) end |
|
|
| Report Abuse |
|
|
|
| 10 Mar 2017 05:02 PM |
| ^ df u have a math operation outside of a print? |
|
|
| Report Abuse |
|
|
|
| 10 Mar 2017 05:03 PM |
| ^ was meant to @Gomlsauresrex |
|
|
| Report Abuse |
|
|
BlupoV2
|
  |
| Joined: 12 Nov 2012 |
| Total Posts: 543 |
|
|
| 10 Mar 2017 05:04 PM |
@Lua You could do
string.format("%02d", sec) |
|
|
| Report Abuse |
|
|
| |
|
| |
|