PDA

View Full Version : question regarding points numbers


wallen
26/02/2018, 11:30 PM
Look at that picture https://i.imgur.com/UKACuYe.png how do i make these numbers look like the moneys, that they start from 000000 and eventually when you earn a point you start to 0000034, etc.?? Already tried with something like float, but it fucks up and i get errors lol.

format(InfoString, sizeof(InfoString), "%i", pInfo[playerid][Points]);
TextDrawSetString(CASH4[playerid], InfoString);

That's actually how the code is made for showing points on TD.

DobbysGamertag
27/02/2018, 01:25 AM
new number = 600;
printf("%06d", number);


You're looking for the 06 part of the code above. It tells the function to pad zero's on up to the (n)th digit.


%0(n)<specifier>

wallen
27/02/2018, 11:11 AM
Thanks solved