How can i keep zero's in a string with numbers?
#1

Well im making this new textdraw for money on screen.
I have this now;
pawn Код:
new mystring[10];
format(mystring,sizeof(mystring),"$%02d",pData[playerid][pCash]);
It shows the correct value but for example;
the string shows $100
but i actually want it to show $00000100 and so on.

I have read the wiki about it here https://sampwiki.blast.hk/wiki/Format
It doesnt explain the '02' part in %02d..maybe someone can explain what that does too ? as it might be related to my
question.

thanks in advance
Reply


Messages In This Thread
How can i keep zero's in a string with numbers? - by AIped - 30.06.2014, 12:14
Re: How can i keep zero's in a string with numbers? - by Stinged - 30.06.2014, 12:22
Re: How can i keep zero's in a string with numbers? - by Vince - 30.06.2014, 12:28
Re: How can i keep zero's in a string with numbers? - by AIped - 30.06.2014, 12:48

Forum Jump:


Users browsing this thread: 1 Guest(s)