[HELP]Numbers
#1

I want there to be dot in every number: 12400 => 12.400, 53000 => 53.000.
for example: Congratulations! You have just won $14.560!

Код:
format(str, 64, "Congratulations! You have just won $%d!", Winnings[playerid]);
SendClientMessage(playerid, COLOR_WHITE, str);
which sign should be replaced with '%d'? or what I need to do to make so? please help

Reply
#2

hey ppl please reply
Reply
#3

float(number / 1000.0)
then use %.3f in your string.
Ex: format(str, 64, "Congratulations! You have just won $%.3f!", float(Winnings[playerid] / 1000.0));
It will show the way you want it to as long as the number is above 10,000 and below 100,000.
Reply
#4

hay thanks very much mate
Reply
#5

Quote:
Originally Posted by 90NINE
float(number / 1000.0)
then use %.3f in your string.
Ex: format(str, 64, "Congratulations! You have just won $%.3f!", float(Winnings[playerid] / 1000.0));
It will show the way you want it to as long as the number is above 10,000 and below 100,000.
how to make $1000000 => $1.000.000?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)