Is it possible
#3

Quote:
Originally Posted by Mister0
Посмотреть сообщение
try this

Код:
format(string,sizeof(string),"your money %s",FormatNumber(PlayerInfo[playerid][pMoney]));
SendClientMessage(playerid,-1,string);
and the stock
Код:
stock 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);
   }
   else  format( Str, 15, "<NUMBER ERROR>" );
   return Str;
}
Didn't work, always show "49"
Reply


Messages In This Thread
Is it possible - by BrianS123 - 01.09.2016, 10:26
Re: Is it possible - by Mister0 - 01.09.2016, 10:34
Re: Is it possible - by BrianS123 - 01.09.2016, 10:44
Re: Is it possible - by Threshold - 01.09.2016, 10:44
Re: Is it possible - by BrianS123 - 01.09.2016, 10:48
Re: Is it possible - by Mister0 - 01.09.2016, 11:04
Re: Is it possible - by JaKe Elite - 01.09.2016, 11:18
Re: Is it possible - by BrianS123 - 01.09.2016, 11:32
Re: Is it possible - by BrianS123 - 01.09.2016, 11:34
Re: Is it possible - by Vince - 01.09.2016, 11:54

Forum Jump:


Users browsing this thread: 1 Guest(s)