Jump to content

[REZOLVAT] bani infiniti in banca


Nigga
 Share

Recommended Posts

Acum 2 ore, GroWy a spus:

 


stock formatNumber(number) 
{
	new string[20];
	format(string, sizeof(string), "%d", number);

	if(strlen(string) < 4)
		return string;

	for(new i = (strlen(string) - 3); i > 0; i -= 3)
		strins(string, ".", i);

      return string;
}

????

:)))))))))))))))))))))))))))))))))

?imw=5000&imh=5000&ima=fit&impolicy=Lett

Link to comment
Share on other sites

Acum 7 minute, Nigga a spus:

unde naiba gasesc functia respectiva ca nu e in gamemode, e in ceva include sau trebuie eu sa o includ undeva?

cauta formatnumber(number)

?imw=5000&imh=5000&ima=fit&impolicy=Lett

Link to comment
Share on other sites

Am gasit-o, o am la fel. 

FormatNumber(number) {
   new Str[15];
   format(Str, 15, "%d", number);
   if(strlen(Str) < sizeof(Str)) {
      if(number >= 1000 && number < 10000) strins( Str, ",", 1, sizeof(Str));
      else if(number >= 10000 && number < 100000) strins(Str, ",", 2, sizeof(Str));
      else if(number >= 100000 && number < 1000000) strins(Str, ",", 3, sizeof(Str));
      else if(number >= 1000000 && number < 10000000) strins(Str, ",", 1, sizeof(Str)),strins(Str, ",", 5, sizeof(Str));
      else if(number >= 10000000 && number < 100000000) strins(Str, ",", 2, sizeof(Str)),strins(Str, ",", 6, sizeof(Str));
      else if(number >= 100000000 && number < 1000000000) strins(Str, ",", 3, sizeof(Str)),strins(Str, ",", 7, sizeof(Str));
      else if(number >= 1000000000 && number < 10000000000)
           strins(Str, ",", 1, sizeof(Str)),
           strins(Str, ",", 5, sizeof(Str)),
           strins(Str, ",", 9, sizeof(Str));
      else format(Str, 10, "%d", number);
   }
   return Str;
}

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...