SA-MP Forums Archive
Need Some Help In TDM. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need Some Help In TDM. (/showthread.php?tid=355037)



Need Some Help In TDM. - Champ - 28.06.2012

i have made a map chaning system but there is some problem and the problem is that i have 12 maps and all are working good but in the last map. when the last map's timer finishs then it does not reset to 1st map.

last map

pawn Код:
case 11: { // MFPD
            SendRconCommand("mapname MFPD" );
            if(gTeam[playerid] == TEAM_HUMAN) {
                SetPlayerPos(playerid, -2086.5854,296.9832,41.0602);
                SetPlayerFacingAngle(playerid,238.3208);
            }
            if(gTeam[playerid] == TEAM_ZOMBIE) {
                SetPlayerPos(playerid , -1963.0413,255.7414,35.4739) ;
                SetPlayerFacingAngle(playerid,358.2750);
            }
and the first map

pawn Код:
case 0: { // Dam Power Source
            SendRconCommand("mapname Dam Power Source" );
            if(gTeam[playerid] == TEAM_HUMAN) {
                SetPlayerPos(playerid,-938.9497,1847.1716,5.0000);
                SetPlayerInterior(playerid,17);
            }
            if(gTeam[playerid] == TEAM_ZOMBIE) {
                SetPlayerPos(playerid ,-957.0829,1930.4469,5.0000) ;
                SetPlayerInterior(playerid,17);
            }
        }
i don't know why the last map does not reset to first map. Help me please.


Re: Need Some Help In TDM. - mati233 - 28.06.2012

Can you show how are your timer working?


Re: Need Some Help In TDM. - [A]ndrei - 28.06.2012

so does it reset to map two or does it just stay lways in map 12?


Re: Need Some Help In TDM. - Champ - 29.06.2012

No it resets last map again and again


Re: Need Some Help In TDM. - Randy More - 29.06.2012

Show us the timer code/the code supposed to reset to the first map again.


Re: Need Some Help In TDM. - Champ - 29.06.2012

pawn Код:
public StartedNewRound(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        SpawnPlayer ( i ) ;
        switch ( Map )
        {
            case 0:{
                GameMinutes =1;
                GameSeconds =0;
            }
pawn Код:
case 11: {
                GameMinutes =1;
                GameSeconds =0;
            }
        }
    }
    return 1;
}
pawn Код:
public NewMapTimer(playerid) {

SetTimer("StartedNewRound",2500,0);
   
    return 1;
}



Re: Need Some Help In TDM. - Randy More - 29.06.2012

I can't see this giving a value or something so a player spawns at the map or something, also why do you have "playeried" defined in the timer function while you loop through all players.


Re: Need Some Help In TDM. - Champ - 29.06.2012

i have followed this tutorial

http://forum.sa-mp.com/showthread.ph...+change+system

Please help..


Re: Need Some Help In TDM. - Kitten - 29.06.2012

Reset the variable map to 0.


Re: Need Some Help In TDM. - [A]ndrei - 29.06.2012

can you give us the hole entire code