[Doubt] How to do this.
#1

I am trying to make a random number with numbers that I provide but I do not deal with the form.

pawn Код:
new Number[MAX_BUSINNES] = 0;
for (new i = 0; i < MAX_BUSINNES; i ++)
{
    if (NegociosInfo[i][bizType] == 1)
    {
        Number[i] = 1;
    }
}
// here would go random ...
Sorry for my bad english.
So far everything is correct but the question is, how can I create a randon with the number function in 1?.
+ Rep who help me.
Reply
#2

Let me get you straight, you want to generate a random number?
Reply
#3

A random number with the function Number [i] = 1;
Reply
#4

Can you be more explicit?
Do you mean you want to generate random numbers and store them in the Number array? Like
PHP код:
Number[0] = 54515;
Number[1] = 41726;
Number[2] = 57756;
Number[3] = 25254;
//...etc.. 
like this?
Reply
#5

My idea is to loop through all Type 1 businesses and store their IDS.
Example:
Business 1, 5, 8, 20.

As I can store those images and then create a loop that does not sea in correlative order if not the 1, 5, 8, 20.

My idea is for the job of truck driver, to look for certain businesses and send it to one obtained at random through the loop.
Reply
#6

What is NegociosInfo?
Reply
#7

Solved.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)