Formatting numbers help!
#5

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/AddCommas
https://sampforum.blast.hk/showthread.php?tid=184328

pawn Код:
stock ConvertToAmount(value)
{
    new string[13], count = -1;
    valstr(string, value);

    for(new i = strlen(string); i > 0; i --)
    {
        count ++;

        if(count == 3)
        {
            strins(string, ",", i);
           
            count = 0;
        }
    }
    return string;
}
Thank you very much, useful!
Thank you Shoulen too!
Reply


Messages In This Thread
Formatting numbers help! - by E7mad - 18.12.2015, 19:25
Re: Formatting numbers help! - by Shoulen - 18.12.2015, 20:15
Re: Formatting numbers help! - by SickAttack - 18.12.2015, 20:20
Re: Formatting numbers help! - by Shoulen - 18.12.2015, 20:21
Re: Formatting numbers help! - by E7mad - 18.12.2015, 20:36
Re: Formatting numbers help! - by Vince - 19.12.2015, 00:32

Forum Jump:


Users browsing this thread: 1 Guest(s)