17.02.2013, 10:39
pawn Код:
if(time == 00 || time == 15 || time == 30 || time == 45)
{
if(drugpointcounter == 10) { drugpointcounter = 0; }
if(drugpointcounter == 0)
{
for(new i=0;i<10;i++)
{
usednumbers[i] = 99;
}
}
new rand = random(10);
drugclear = 0;
while(drugclear == 0)
{
for(new j=0;j<10;j++)
{
if(usednumbers[j] == rand) { rand = random(10); }
if(usednumbers[j] != rand) { drugclear = 1; usednumbers[drugpointcounter] = rand; }
}
}
MoveSmugglingPoint(rand);
drugpointcounter++;
}
Then second time, it gives another, but makes sure it's not any of the last ones used.
Same for the third, till it reaches 10 when it resets.
usednumbers has 9 cells, to save the used numbers, and drugpointcounter makes sure to reset it the 10th time.
It won't but, and I can't understand why!