Results 1 to 3 of 3

Thread: Time conversion

  1. #1
    iBot User
    Join Date
    Jan 2014
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    10
    Rep Power
    3

    Time conversion

    Is there a way to convert minutes counted time like stamina to hour on the HUD? I tried searching on the forum but it seems like nobody did it before, I just divided the time by 60 but thats ugly, like 2,5 hours

  2. #2
    Moderator Drakke's Avatar
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,898
    Mentioned
    216 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    390 Post(s)
    Reputation
    366
    Rep Power
    10
    Quote Originally Posted by Beggas View Post
    Is there a way to convert minutes counted time like stamina to hour on the HUD? I tried searching on the forum but it seems like nobody did it before, I just divided the time by 60 but thats ugly, like 2,5 hours
    There you go
    string.format("%.2d:%.2d", stamina / 60, stamina % 60)

  3. #3
    iBot User
    Join Date
    Jan 2014
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    10
    Rep Power
    3
    Quote Originally Posted by Drakke View Post
    There you go
    string.format("%.2d:%.2d", stamina / 60, stamina % 60)
    Thanks sir, this helped me a lot

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •