2 character integer from one
#1

I have two integers - minutes and seconds but the seconds are like 0 1 2 3 4 5 6 7 8 9 10 etc., but I want it to display as '1:03' for example. I know it's something like %02i or something, but that wont work for me. Any help appriciated.

Please don't suggest that I use if < 10 add a 0, because I don't want to do that.
Reply
#2

pawn Код:
format(string, sizeof(string), "%02i:%02i", seconds/60, seconds%60);
Reply
#3

Yeah, it works. I forgot to GMX, sorry.
Reply
#4

*cough*
What's GMX?
Reply
#5

Quote:
Originally Posted by maramizo
Посмотреть сообщение
*cough*
What's GMX?
GMX = restarting command (rcon) for samp
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)