28.09.2010, 10:00
Quote:
Or you can make a global variable, which OnPlayerSpawn checks, and the spawns the players on specific co-ords depending on the variable. Then change the variable by a timer
|
pawn Код:
new Area[3];
new Float:Area1Spawn[3][3] =
{
{x,y,z},
{x,y,z},
{x,y,z},
};
new Float:Area2Spawn[3][3] =
{
{x,y,z},
{x,y,z},
{x,y,z},
};
new Float:Area3Spawn[3][3] =
{
{x,y,z},
{x,y,z},
{x,y,z},
};
pawn Код:
if(Area[0] == 1)
{
new rand = sizeof(Area1Spawn);
SetPlayerPos(playerid,Area1Spawn[rand][0],Area1Spawn[rand][1],Area1Spawn[rand][2]);
}
if(Area[1] == 1)
{
new rand = sizeof(Area2Spawn);
SetPlayerPos(playerid,Area2Spawn[rand][0],Area2Spawn[rand][1],Area2Spawn[rand][2]);
}
if(Area[2] == 1)
{
new rand = sizeof(Area3Spawn);
SetPlayerPos(playerid,Area3Spawn[rand][0],Area3Spawn[rand][1],Area3Spawn[rand][2]);
}