Formatting numbers help!
#3

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;
}
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: 2 Guest(s)