15.06.2014, 23:40
(
Последний раз редактировалось SickAttack; 16.06.2014 в 03:56.
)
Here:
Version without bool:
Version with bool (Suggested by Kimossab):
Note: "bool" is a weak tag and "Bool" is a strong tag.
Version without bool:
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 < MAX_LOTTO_NUMBERS; i++)
{
LottoNumbers[i] = 0;
}
pawn Код:
// On top of your gamemode:
#define MAX_LOTTO_NUMBERS 100
new Bool:LottoNumbers[MAX_LOTTO_NUMBERS];
// This goes in the command:
if(LottoNumbers[number] == true)
{
// Lotto number is taken.
return 1;
}
LottoNumbers[number] = true;
// To reset the lotto numbers use the code below:
for(new i = 0; i < MAX_LOTTO_NUMBERS; i++)
{
LottoNumbers[i] = false;
}