13.09.2013, 21:42
Quote:
default ponho case 1: depois noutra arena que eu adicione, case 2: etc certo ?
|
pawn Код:
forward MudarArena(playerid);
public MudarArena(playerid)
{
for(new i; i < MAX_PLAYERS; i++)
{
new pt = random(2); // 2 numero de arenas
switch(pt)
{
case 0:
{
rand = random(sizeof(SpawnA1));
SetPlayerPos(playerid, SpawnA1[rand][0], SpawnA1[rand][1], SpawnA1[rand][2]);
GetPlayerFacingAngle(playerid, SpawnA1[rand][3]);
SetTimer("MudarArena", 900000, 1);
}
case 1:
case 2:
....
default:
{
rand = random(sizeof(SpawnA2));
SetPlayerPos(playerid, SpawnA2[rand][0], SpawnA2[rand][1], SpawnA2[rand][2]);
GetPlayerFacingAngle(playerid, SpawnA2[rand][3]);
SetTimer("MudarArena", 900000, 1);
}
}
}
return 1;
}