Random checkpoints
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
Use an array.

pawn Код:
static const Float:pizzaPoint[][3] = {
    {2335.4380,121.7660,26.4844},
    {2336.0911,196.6093,26.4963},
    // ...
    {793.7676,-511.0729,16.8068}
};
pawn Код:
new rand = random(sizeof(pizzaPoint));
SetPlayerCheckpoint(playerid, pizzaPoint[rand][0], pizzaPoint[rand][1], pizzaPoint[rand][2], 2.0);
I tried using this before, but what happens is that when I drive over the checkpoint, nothing happens.
Reply


Messages In This Thread
Random checkpoints - by siemka321 - 21.02.2013, 11:34
Re: Random checkpoints - by Vince - 21.02.2013, 11:40
Re: Random checkpoints - by siemka321 - 21.02.2013, 11:48
Re: Random checkpoints - by JamesS - 21.02.2013, 12:31

Forum Jump:


Users browsing this thread: 1 Guest(s)