22.04.2014, 17:08
Random amount of cash? Something like this?
I hope i understood you and helped you BTW code randomEx is not mine!
Код:
stock randomEx(min, max) { new rand = random(max-min)+min; return rand; } Use: for(new i=0; i<MAX_PLAYERS; i++) { new amount = randomEx(0, 3000000); GivePlayerMoney(i, -amount); GivePlayerMoney(playerwhowillgetmoney, 2*amount); // 2* is because he already lost 'amount' like everybody else, so he needs twice... }