Multiple Spawn Points
#1

How can I make so I have these coordinates:

{ 1 }
{ 2 }
(Those are not my real coordinates)

And so on until 30 or so.
So when I do /startgame all players will be assigned to a spot.
But my question is how will I do that?
For example all coordinates are in a line with 1m between them.
So when I do /startgame all players will spawn in a line.
Help?
Reply
#2

I don't know if this is most efficient, but anyways:
pawn Код:
new co_ords[][4]
{
     {X, Y, Z, 0},
     {X1, Y1, Z1, 0}
};

public OnPlayerSpawn(playerid)
{
      for(new i = 0 ;  i < sizeof( co_ords ); i ++ )
      {
           if( co_ords[ i ][ 3 ] == 0 ) // 4th USED PARAMETERS
           {
                   SetPlayerPos(iX, iY, iZ...);
                   co_ords[ i ][ 3 ] = 1; // USED
          }
     }
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)