22.09.2015, 16:22
Hello,
I'm creating a script where i want to pick a random business out of all the existing businesses i have.
This is my current code to loop through businesses.
But I can't think of a way to randomly pick one of the business ID's.
I'm creating a script where i want to pick a random business out of all the existing businesses i have.
This is my current code to loop through businesses.
pawn Код:
new randombiz;
for(new i = 1; i < MAX_BUSINESSES; i++)
{
if(BusinessInfo[i][ExteriorX] != 0)
{
randombiz = i;
break;
}
}