Best way to make sure this number isn't the same as any others?
#3

pawn Код:
for(new i = 0; i < MAX_FURNI; i++)
{
    if(FurniCode[i] == furnic)
    {
        furnic = rand // generate the number again and loop again
        continue;
    }
}
Just generate a new number if it matches and continue to see if it still matches. Or you can keep a variable that increments each time a furniture object is created and save and load it when the server closes / starts.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)