16.02.2012, 14:36
edit
i removed the other code because this is more simpler
i removed the other code because this is more simpler
pawn Код:
//add this at the top
new Cmaps;
//you only need the timer once !
//put it "OnPlayerConnect" or wherever you want! but if using it like OnPlayerSpawn you will need to kill the timer //so i will suggest you dont use it there.
SetTimerEx("NextMap", 20000, true, "i", 10);//not the number "10" at the end is for the maximum maps you will have !
forward NextMap(maps);
public NextMap(maps)
{
Cmaps++;
if(maps>= Cmaps) Cmaps=0;
switch(maps)
{
case 0:{
for(new playerid; playerid<GetMaxPlayers(); playerid++)//this will loop through all you players
{
SetPlayerPos(playerid,X,Y,Z);//this is the 1st MAP
}
}
case 1:{
for(new playerid; playerid<GetMaxPlayers(); playerid++)
{
SetPlayerPos(playerid,X,Y,Z);//this is the 2st MAP
}
case 2:{
for(new playerid; playerid<GetMaxPlayers(); playerid++)
{
SetPlayerPos(playerid,X,Y,Z);//this is the 3st MAP
}
//and you just continue like that..
}
}
}