12.12.2016, 09:04
Quote:
The HUD only has 8 digits, so an extremely surreal unrealistic economy wasn't a really bright idea.
About getting the total amount of cash held by the users on the server. You can do that with a simple SQL statement that does all the work for you. You just have to display the number it gives you. About players being able to have so unrealistic amounts of money, you can create an array. Look at them as pockets, wallets or whatever. Wallet 1: 500 bucks Wallet 2: 200 bucks Total cash by adding all the wallets up: 700 bucks You just gotta think out of the box sometimes. Good luck and have fun! |
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; } } } }