/buycar command
#4

Quote:
Originally Posted by Longover
Посмотреть сообщение
FormatNumber:

Код:
FormatNumber(number)
{
	new tStr[16];

    new number2 = number;
    if(number < 0) number = number * -1;

    format(tStr, sizeof(tStr), "%d", number);

    if(strlen(tStr) < 4)
 	return tStr;

    new iPos = strlen(tStr), iCount = 1;

    while(iPos > 0)
    {
		if(iCount == 4)
		{
			iCount = 0;
			strins(tStr, ",", iPos, 1);
			iPos++;
		}
        iCount++;
        iPos--;
    }
    if(number2 < 0) format(tStr, sizeof(tStr), "-%s", tStr);
    return tStr;
}
Stock:

Код:
enum vInfo
{
	vID,
	vStock,
	vPrice,
	vModel,
	vSpeed,
	vName[255]
};
new Stock[106][vInfo];
someone can help me?
Someone?
Reply


Messages In This Thread
/buycar command - by Longover - 04.03.2019, 18:48
Re: /buycar command - by JasonRiggs - 04.03.2019, 22:14
Re: /buycar command - by Longover - 04.03.2019, 23:20
Re: /buycar command - by Longover - 08.03.2019, 18:21

Forum Jump:


Users browsing this thread: 2 Guest(s)