Crazy Map Change
#1

Hi , i have a Crazy map Change :

whene the current map is Round2 , and i deco/reco and spawn , i go to Round 1 , how to fix it ?
and also sometimes the map change system spawn me two times in the same round...

My full Map change system :
pawn Код:
new Cmaps;
new CurrentMap;
pawn Код:
public OnGameModeInit()
{
    UsePlayerPedAnims();
    DisableInteriorEnterExits();
    SetTimer("NextMap", 40000, true); //my map Time 40 sec to test if the map change ;)
    //SKINY
    //CT
    AddPlayerClass(285,2533.8667,2753.3320,10.8203,90.5278,0,0,0,0,0,0);
    AddPlayerClass(284,2533.8667,2753.3320,10.8203,90.5278,0,0,0,0,0,0);
    AddPlayerClass(164,2533.8667,2753.3320,10.8203,90.5278,0,0,0,0,0,0);
    AddPlayerClass(163,2533.8667,2753.3320,10.8203,90.5278,0,0,0,0,0,0);
    //T
    AddPlayerClass(248,2667.8340,2717.2986,10.8203,31.6018,0,0,0,0,0,0);
    AddPlayerClass(179,2667.8340,2717.2986,10.8203,31.6018,0,0,0,0,0,0);
    AddPlayerClass(124,2667.8340,2717.2986,10.8203,31.6018,0,0,0,0,0,0);
    AddPlayerClass(125,2667.8340,2717.2986,10.8203,31.6018,0,0,0,0,0,0);
// i don't write return here cause after there are objects... so i post only teams Pos + map change timer
pawn Код:
forward NextMap(playerid);
public NextMap(playerid) {
    if(Cmaps > 1) Cmaps = 0;
    switch(Cmaps) {
        case 0: {
            if(gTeam[playerid] == TEAM_CT) {
                SetPlayerPos(playerid,2533.8667,2753.3320,10.8203); //pos of Counter Terrorist in Round 1
                SetPlayerFacingAngle(playerid,90.5278);
            } else if(gTeam[playerid] == TEAM_T) {
                SetPlayerPos(playerid,2667.8340,2717.2986,10.8203);  //pos of Terrorist in Round 1
                SetPlayerFacingAngle(playerid,31.6018);
            }
            CurrentMap = 0;
        } case 1: {
            if(gTeam[playerid] == TEAM_CT) {
                SetPlayerPos(playerid,1801.1047,-2991.1992,6.1988);  //pos of Counter Counter Terrorist in Round 2(medival)
                SetPlayerFacingAngle(playerid,183.9618);
            } else if(gTeam[playerid] == TEAM_T) {
                SetPlayerPos(playerid,1846.0448,-3083.0525,6.6550); //pos of Terrorsit in Round 2(map name medival)
                SetPlayerFacingAngle(playerid,44.1783);
            }
            CurrentMap = 1;
        }
    }
    Cmaps++;
}
And there are map change implented to check the Map in Public onplayerlogin Credits to Toreno
pawn Код:
public OnPlayerLogin(playerid, Password[])
{
    if(IsPlayerConnected(playerid))
    {
      if(strlen(Password) == 0) return ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "{00CCFF}Login", "{FFFFFF}Please enter password for login \n\n\n{FF0000}Login is required", "Login", "");
      if(strcmp(dini_Get(file[playerid], "Password"), Password, true) == 0)
       {
        if(CurrentMap == 0) {
                if(gTeam[playerid] == TEAM_CT) {
                    SetPlayerPos(playerid,2533.8667,2753.3320,10.8203);
                    SetPlayerFacingAngle(playerid,90.5278);
                } else if(gTeam[playerid] == TEAM_T) {
                    SetPlayerPos(playerid,2667.8340,2717.2986,10.8203);
                    SetPlayerFacingAngle(playerid,31.6018);
                }
            } else if(CurrentMap == 1) {
                if(gTeam[playerid] == TEAM_CT) {
                    SetPlayerPos(playerid,1801.1047,-2991.1992,6.1988);
                    SetPlayerFacingAngle(playerid,183.9618);
                } else if(gTeam[playerid] == TEAM_T) {
                    SetPlayerPos(playerid,1846.0448,-3083.0525,6.6550);
                    SetPlayerFacingAngle(playerid,44.1783);
                }
            }
         IsLogged[playerid] = true;
         SendClientMessage(playerid, COLOR_MODRA, " *You've successfully logged in !");
         GivePlayerMoney(playerid, dini_Int(file[playerid], "Money"));
         SetPlayerScore(playerid, dini_Int(file[playerid], "Score"));
         Vip[playerid] = dini_Int(file[playerid], "Vip");
         AdminLevel[playerid] = dini_Int(file[playerid], "Admin");
      }
      else
      {
         ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "{00CCFF}Login", "{FF0000}Incorrect Password{FFFFFF}\nplease try again", "Login", "");
      }
    }
    return 1;
}
i Hope you help me
Reply
#2

i forgot to say that if anyone want to fix it i can Pm him the GM ...
Reply
#3

Anyone ?
Reply
#4

Read this!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)