Hello
I'm using
get_time_length() to display a time remaining hud message.
Code:
new hud[125]
get_time_length(iPlayers[i], g_iRoundTime, timeunit_seconds, hud, charsmax(hud));
But it gets formated like this:
Is there anyway to use the
HH:MM:SS format?
EDIT: Fixed it by borrowing the code from another plugin.
Code:
new hud[125]
new m = g_iRoundTime/60
new h = m/60
new s = g_iRoundTime-m*60
m = m-h*60
if(h)
formatex(hud,charsmax(hud),"%d:%02d:%02d",h,m,s)
else
formatex(hud,charsmax(hud),"%d:%02d",m,s)
__________________