Help with bus job
#6

Yes it will, as it always takes a random number between 0 and the max-size of that array.

You could do this:

pawn Код:
new RandCoord = random(sizeof(BusCP));
new Float:x = BusCP[RandCoord][0];
new Float:y = BusCP[RandCoord][1];
new Float:z = BusCP[RandCoord][2];
SetPlayerCheckpoint(playerid, x, y, z, 10);
Or more directly:
pawn Код:
new RandCoord = random(sizeof(BusCP));
SetPlayerCheckpoint(playerid, BusCP[RandCoord][0], BusCP[RandCoord][1], BusCP[RandCoord][2], 10);
Reply


Messages In This Thread
Help with bus job - by LeXuZ - 27.11.2014, 18:12
Re: Help with bus job - by PowerPC603 - 27.11.2014, 19:20
Re: Help with bus job - by LeXuZ - 27.11.2014, 19:23
Re: Help with bus job - by PowerPC603 - 27.11.2014, 19:34
Re: Help with bus job - by LeXuZ - 27.11.2014, 19:35
Re: Help with bus job - by PowerPC603 - 27.11.2014, 19:38
Re: Help with bus job - by LeXuZ - 27.11.2014, 19:41
Re: Help with bus job - by LeXuZ - 27.11.2014, 19:45
Re: Help with bus job - by PowerPC603 - 27.11.2014, 20:27

Forum Jump:


Users browsing this thread: 7 Guest(s)