12.12.2016, 15:45
Quote:
But let's say I'd calculate the total sum of the array, I would use a loop. And the variable that returns the total amount is still a 32 bit integer. So I could I do that?
I mean, I already kinda know how to add the money, but I don't know how to calculate it. Код:
new money[MAX_PLAYERS][20]; stock AddMoney(playerid, money) { for(new i; i < 20; i++) { if(money[playerid][i] < 2147483647) { if(money[playerid][i] + money <= 2147483647) { money[playerid][i] += money; break; } } } } |