Random();
#2

well IRL planes are Dest ID - unique number. so it'd be LV SF or LS.
random(x); goes from 0 - x so if you wanted from 100 - 999 you would do min + random(max - min)

example
pawn Код:
switch(random(3))
{
    case 0: format(string,sizeof(string),"LV - ",100 + random(899));
    case 1: format(string,sizeof(string),"SF - ",100 + random(899));
    case 2: format(string,sizeof(string),"LS - ",100 + random(899));
}
Reply


Messages In This Thread
Random(); - by Typhome - 25.02.2011, 11:18
Re: Random(); - by cessil - 25.02.2011, 11:34

Forum Jump:


Users browsing this thread: 2 Guest(s)