//run a timer like 20 mins or after what time you want to change the map and just do
SetTimerEx("NextMap", 20000, false, "i", 2);//this will change it to 3rd map (case 2)
forward NextMap(maps);
public NextMap(maps)
{
switch(maps)
{
case 0:{SetPlayerPos(.....}
case 1:{SetPlayerPos(.....}
//so on just changin the pos to another map
/with the case.
}
}
i mean , why members can't make the Map change system in a FS or something ..
BTW : i loved your mReg system . |
//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..
}
}
}
main()
{
state CurrentMap:Map001;
}
entry() <CurrentMap:Map001>
{
// This acts like OnGameModeInit and is called everytime the script switches to this state
SetGameModeText("Map 001");
}
entry() <CurrentMap:Map002>
{
SetGameModeText("Map 002");
}
public OnPlayerSpawn(playerid) <CurrentMap:Map001>
{
// Do stuff for map 1
return 1;
}
public OnPlayerSpawn(playerid) <CurrentMap:Map002>
{
// Do stuff for map 2
return 1;
}
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,2533.8667,2753.3320,10.8203);
SetPlayerFacingAngle(playerid,90.5278);//this is the 1st MAP
}
}
case 1:{
for(new playerid; playerid<GetMaxPlayers(); playerid++)
{
SetPlayerPos(playerid,2666.7036,2797.8311,17.6896);//this is the 2st MAP
}
//and you just continue like that..
}
}
}
forward NextMap(maps);
public NextMap(maps)
{
Cmaps++;
if(Cmaps>= maps) Cmaps=0;
switch(Cmaps)
{
case 0:{
for(new playerid; playerid<GetMaxPlayers(); playerid++)
{
if(GetPlayerTeam(playerid) == 1) SetPlayerPos(playerid,2533.8667,2753.3320,10.8203);
if(GetPlayerTeam(playerid) == 1) SetPlayerFacingAngle(playerid,90.5278);
if(GetPlayerTeam(playerid) == 2) SetPlayerPos(playerid,x,y,z);//change to the team2 pos
if(GetPlayerTeam(playerid) == 2) SetPlayerFacingAngle(playerid,90.5278);
}
}
case 1:{
for(new playerid; playerid<GetMaxPlayers(); playerid++)
{
if(GetPlayerTeam(playerid) == 1) SetPlayerPos(playerid,2666.7036,2797.8311,17.6896);
if(GetPlayerTeam(playerid) == 2) SetPlayerPos(playerid,x,y,z);//change to the team2 pos
}
}
}
}