[Solved]Random spawn points
#4

Quote:
Originally Posted by [SE
FeaR ]
pawn Код:
new RandomSpawn = random(3); //3 Random spawns
pawn Код:
if (RandomSpawn == 0)
{
  SetPlayerPos(playerid, ....); //1st Spawn
}
if (RandomSpawn == 1)
{
  SetPlayerPos(playerid, ....); //2nd Spawn
}
if (RandomSpawn == 2)
{
  SetPlayerPos(playerid, ....); // 3rd Spawn
}
A switch case is better,
pawn Код:
switch(RandomSpawn)
{
    case 0:
    {
        SetPlayerPos( ... );
    }
    case 1:
    {
        SetPlayerPos( ... );
    }
    case 2:
    {
        SetPlayerPos( ... );
    }
}
Reply


Messages In This Thread
[Solved]Random spawn points - by Dezi - 16.02.2009, 11:12
Re: Random spawn points - by tehcudguy - 16.02.2009, 12:15
Re: Random spawn points - by Dezi - 16.02.2009, 12:32
Re: Random spawn points - by Marcel - 16.02.2009, 12:35
Re: Random spawn points - by Dezi - 16.02.2009, 17:45
Re: Random spawn points - by Dezi - 16.02.2009, 17:48
Re: Random spawn points - by NaS - 16.02.2009, 18:02
Re: Random spawn points - by Dezi - 16.02.2009, 18:04
Re: Random spawn points - by tehcudguy - 16.02.2009, 18:05
Re: Random spawn points - by Dezi - 16.02.2009, 18:12

Forum Jump:


Users browsing this thread: 1 Guest(s)