Teleport
#3

I'd like to point out that the index starts from 0 so it would be: d2[0][0], d2[0][1], d2[0][2]
Index 3 is out of bounds.

You can use another array with the size of d2 so you can know which position is taken and move on:
pawn Код:
new bool: d2_available[sizeof (d2)];
pawn Код:
for (new j; j != sizeof (d2_available); ++j)
{
    if (d2_available[j]) continue;
   
    d2_available[j] = true;
    SetPlayerPos(playerid, d2[j][0],d2[j][1],d2[j][2]);
    break;
}
Reply


Messages In This Thread
Teleport - by CroM256 - 30.03.2014, 16:07
Re: Teleport - by RenovanZ - 30.03.2014, 16:10
Re: Teleport - by Konstantinos - 30.03.2014, 16:18
Re: Teleport - by CroM256 - 01.04.2014, 11:41
Re: Teleport - by Konstantinos - 01.04.2014, 11:46

Forum Jump:


Users browsing this thread: 1 Guest(s)