Random Spawn
#3

Fallout's way is an option, OR:

pawn Код:
new RandomSpawns[][4] = { // X - Y - Z- Angle
{1250.00000, -1250.00000, 50.00000, 360},
{180.00000, -30.00000, 2.00000, 300},
{1250.00000, -1250.00000, 3.50000, 20} //Add a new line for each new spawn position, the last line must be WITHOUT comma.
};

public OnPlayerSpawn(playerid)
{
  new rand = random(sizeof(RandomSpawns));
  SetPlayerPos(playerid, RandomSpawns[rand][0], RandomSpawns[rand][1], RandomSpawns[rand][2]);
  SetPlayerFacingAngle(playerid, RandomSpawns[rand][4]);
  return 1;
}
Reply


Messages In This Thread
Random Spawn - by bobintom - 19.08.2010, 12:28
Re: Random Spawn - by ғαιιοцт - 19.08.2010, 12:32
Re: Random Spawn - by Hiddos - 19.08.2010, 12:37
Re: Random Spawn - by ғαιιοцт - 19.08.2010, 13:30

Forum Jump:


Users browsing this thread: 1 Guest(s)