R34P3R 11 Posted February 23, 2015 Hey guys. i need to convert seconds into min:sec string.. i know how i get the minutes but how did i get the current seconds ? Thanks a lot. _bombTime = time + 300; // in seconds _curBombtime = _bombTime - time; _bmin = floor(_curBombtime / 60); if (_bmin < 10) then {_bmin = format["0%1",_bmin]}; _bsec = ???? :D Share this post Link to post Share on other sites
Sniperwolf572 758 Posted February 23, 2015 _bsec = _curBombtime % 60; Share this post Link to post Share on other sites
zgmrvn 95 Posted February 23, 2015 as Sniperwolf572 said, use modulo (%). Modulo return the rest of a division Share this post Link to post Share on other sites
mrcurry 507 Posted February 23, 2015 You can also use: https://community.bistudio.com/wiki/BIS_fnc_secondsToString Example: _bStr = [_curBombtime, "MM:SS"] call BIS_fnc_secondsToString; Share this post Link to post Share on other sites
R34P3R 11 Posted February 23, 2015 BIS_fnc_secondsToString :D :D easy ! ty ! Share this post Link to post Share on other sites