Jump to content

[REZOLVAT] bani infiniti in banca


Nigga
 Share

Recommended Posts

La 10.06.2019 la 14:08, Wildo a spus:

Arata-mi functia FormatNumber


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;
}

 

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

Link to comment
Share on other sites

1 hour ago, iTECH said:


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;
}

 

E default din gamemode, sau ai editat o pt funcția asta?

Link to comment
Share on other sites

Acum 4 ore, iTECH a spus:


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;
}

 

 

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;
}

????

 

 

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...