Help me
#5

pawn Код:
stock NiceNumber(iNum, const szChar[] = ",")
{
    new
        szStr[16]
    ;
    format(szStr, sizeof(szStr), "%d", iNum);

    for(new iLen = strlen(szStr) - 3; iLen > 0; iLen -= 3)
    {
        strins(szStr, szChar, iLen);
    }
    return szStr;
}
pawn Код:
NiceNumber(12345)

Will output: 12,345 for example
pawn Код:
format(str,sizeof(str),"This is how much it is: %s",NiceNumber(12345));
str will output: This is how much it is: 12,345
Reply


Messages In This Thread
Help me - by Mariciuc223 - 15.07.2015, 09:47
Re: Help me ++REP - by notime - 15.07.2015, 10:37
Re: Help me ++REP - by !damo!spiderman - 15.07.2015, 10:39
Re: Help me ++REP - by notime - 15.07.2015, 10:42
Re: Help me - by liquor - 15.07.2015, 10:47
Re: Help me - by !damo!spiderman - 15.07.2015, 10:52
Re: Help me - by liquor - 15.07.2015, 10:55
Re: Help me - by Virtual1ty - 15.07.2015, 12:27
Re: Help me - by Mariciuc223 - 15.07.2015, 12:45

Forum Jump:


Users browsing this thread: 3 Guest(s)