Quote:
Originally Posted by clavador
pawn Код:
if( vehicleid < 10 ) format(string2,sizeof(string2),"00%i", vehicleid ); else if( vehicleid < 100 ) format(string2,sizeof(string2),"0%i", vehicleid ); else format(string2,sizeof(string2),"%i", vehicleid );
|
Can't believe that there are still people doing that. Just doing the following will make sure that the length of the number is always 3 characters long, padding it with zeros if it's not.
pawn Код:
format(string2,sizeof(string2),"%03i", vehicleid );