Quote:
Originally Posted by SickAttack
Here:
pawn Код:
// On top of your gamemode: #define MAX_LOTTO_NUMBERS 100 new LottoNumbers[MAX_LOTTO_NUMBERS];
// This goes in the command: if(LottoNumbers[number] == 1) { // Lotto number is taken. return 1; } LottoNumbers[number] = 1;
// To reset the lotto numbers use the code below: for(new i = 0; i < 100; i++) { LottoNumbers[i] = 0; }
|
That is a more efficient way of doing what I've posted. But if you're going for the most efficient you might want to use new bool:LottoNumbers[MAX_LOTTO_NUMBERS]; instead, because that will reduce the space needed for all that variables, since you'll just use 1 or 0 (true or false).