08.03.2019, 18:21
Quote:
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; } Код:
enum vInfo { vID, vStock, vPrice, vModel, vSpeed, vName[255] }; new Stock[106][vInfo]; |