Need Some Help In TDM.
#1

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.
Reply
#2

Can you show how are your timer working?
Reply
#3

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

No it resets last map again and again
Reply
#5

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

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;
}
Reply
#7

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.
Reply
#8

i have followed this tutorial

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

Please help..
Reply
#9

Reset the variable map to 0.
Reply
#10

can you give us the hole entire code
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)