Jump to content
  • 0

Problema paintball. GM BigZone


iulian24

Question

Buna seara, vreau sa incep prin a spune ca am luat GM-ul BigZone pentru a-l edita majoritar pentru a face un server de sa:mp.

Odata ajuns sa testez cum merge sistemul de paintball, observam ca la ultima secunda cand ar trebui sa se termine runda, ramane blocat pe ultima secunda , si nu trece la urmatoarea runda.

Daca ma puteti ajuta, si aveti experienta sa va uitati putin 2 minute peste, sau  sa imi spuneti ce e de facut,v-as ruga foarte frumos.

Skype: iulian.trif

mail: [email protected]

 

O seara buna!

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

    if(PlayerInfo[playerid][pPaintBallG] > 0)
        {
            foreach(Player, iddd)
            {
                if(PlayerInfo[iddd][pPaintBallG] == PlayerInfo[playerid][pPaintBallG])
                {
                    SendDeathMessageToPlayer(iddd, killerid, playerid, reason);
                }
            }
            PlayerInfo[killerid][pPaintBallKills]++;
            format(string,sizeof(string),"You have been killed by %s.", GetName(killerid));
            SendClientMessage(playerid, COLOR_GENANNOUNCE, string);
            
            format(string,sizeof(string),"You have killed %s. You now have %d kills.", GetName(playerid), PlayerInfo[killerid][pPaintBallKills]);
            SendClientMessage(killerid, COLOR_GENANNOUNCE, string);
            
            if(PlayerInfo[killerid][pPaintBallG] == 3)
            {
                if(PlayerInfo[killerid][pPaintBallKills] == 2) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 29, 1000); }
                else if(PlayerInfo[killerid][pPaintBallKills] == 4) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 28, 1000); }
                else if(PlayerInfo[killerid][pPaintBallKills] == 6) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 33, 1000); }
                else if(PlayerInfo[killerid][pPaintBallKills] == 8) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 32, 1000); }
                else if(PlayerInfo[killerid][pPaintBallKills] == 10) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 25, 1000); }
                else if(PlayerInfo[killerid][pPaintBallKills] == 12) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 26, 1000); }
                else if(PlayerInfo[killerid][pPaintBallKills] == 14) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 34, 1000); }
                else if(PlayerInfo[killerid][pPaintBallKills] == 16) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 27, 1000); }
                else if(PlayerInfo[killerid][pPaintBallKills] == 18) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 31, 1000); }
                else if(PlayerInfo[killerid][pPaintBallKills] == 20) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 30, 1000); }
                else if(PlayerInfo[killerid][pPaintBallKills] == 22) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 23, 1000); }
                else if(PlayerInfo[killerid][pPaintBallKills] == 24) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 22, 1000); }
                else if(PlayerInfo[killerid][pPaintBallKills] == 26) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 9, 1); }
                else if(PlayerInfo[killerid][pPaintBallKills] == 28) { ResetPlayerWeaponsEx(killerid); ResetPlayerWeapons(killerid); GivePlayerWeaponEx(killerid, 4, 1); }
            }
            
            if(PlayerInfo[killerid][pPaintBallKills] == 29 && PlayerInfo[killerid][pPaintBallG] == 3)
            {
                foreach(Player, i)
                {
                      if(PlayerInfo[pPaintBallG] == 3)
                       {
                          format(string,sizeof(string),"Round over! Winner: %s - 29 kills.",GetName(killerid));
                        SendClientMessage(i, COLOR_YELLOW, string);
                        SendClientMessage(i, COLOR_YELLOW, "Use /votemap to vote for a map.");
                        ResetPlayerWeaponsEx(i);
                        ResetPlayerWeapons(i);
                        SetPlayerArmourEx(i, 0);
                        PlayerInfo[pPaintBallKills] = 0;
                        PlayerInfo[pPaintBallVoted] = 0;
                        PlayerInfo[pPaintBallVoted2] = 0;
                        for (new idd2 = 0; idd2 != 5; ++idd2) SendDeathMessageToPlayer(i, 1001, 1001, 1001);
                    }
                }
                KillTimer(paintrun3);
                paintt[3] = 0;
                paintrs[3] = 31;
                preparepaint3 = SetTimer("PrepareRoundPaintBall3", 1000, 1);
                PaintWinner[3] = 999;
                PaintBallWinnerKills[3] = 0;
                paintvotem[3][0] = 0;
                paintvotem[3][1] = 0;
                paintvotem[3][2] = 0;
                paintvotem[3][3] = 0;
                paintvotem[3][4] = 0;
                mapvoted[3] = 0;
            }
            if(PlayerInfo[killerid][pPaintBallKills] > PaintBallWinnerKills[PlayerInfo[playerid][pPaintBallG]])
            {
                PaintWinner[PlayerInfo[playerid][pPaintBallG]] = killerid;
                PaintBallWinnerKills[PlayerInfo[playerid][pPaintBallG]] = PlayerInfo[killerid][pPaintBallKills];
                foreach(Player, i)
                {
                    if(IsPlayerConnected(i))
                    {
                        if(PlayerInfo[pPaintBallG] == PlayerInfo[playerid][pPaintBallG])
                        {
                            format(string,sizeof(string),"%s is in the lead with %d kills.",GetName(killerid),PaintBallWinnerKills[PlayerInfo[playerid][pPaintBallG]]);
                            SendClientMessage(i, COLOR_YELLOW, string);
                        }
                    }
                }
            }
            return 1;
        }

 

 

 

public PrepareRoundPaintBall1()
{
    if(paintp[1] > 1)
     {
          new string[128];
        if(paintrs[1] >= 1)
         {
              paintrs[1]--;
            foreach(Player, i)
            {
                if(PlayerInfo[pPaintBallG] == 1)
                {
                    PlayerTextDrawShow(i, PaintBallText);
                    if(paintrs[1] > 9) format(string,sizeof(string),"PAINTBALL ROUND STARTS IN ~y~00:%d",paintrs[1]);
                    else format(string,sizeof(string),"PAINTBALL ROUND STARTS IN ~y~00:0%d",paintrs[1]);
                    PlayerTextDrawSetString(i, PaintBallText, string);
                }
            }
        }
        if(paintrs[1] == 2)
        {
            paintrs[1] = 0;
            paintt[1] = 301;
            KillTimer(preparepaint1);
            paintrun1 = SetTimer("PaintBallRun1", 1000, 1);
        }
      }
       else if(paintp[1] < 2)
    {
        paintt[1] = 0;
          paintrs[1] = 0;
          PaintWinner[1] = 999;
        PaintBallWinnerKills[1] = 0;
        paintvoteg[1][0] = 0;
        paintvoteg[1][1] = 0;
        paintvoteg[1][2] = 0;
        paintvotem[1][0] = 0;
        paintvotem[1][1] = 0;
        paintvotem[1][2] = 0;
        paintvotem[1][3] = 0;
        paintvotem[1][4] = 0;
        mapvoted[1] = 0;
        gunvoted[1] = 0;
        KillTimer(preparepaint1);
        KillTimer(paintrun1);
          foreach(Player, i)
        {
            if(PlayerInfo[pPaintBallG] == 1)
            {
                curatj = 0;
                for (new idd2 = 0; idd2 != 5; ++idd2) SendDeathMessageToPlayer(i, 1001, 1001, 1001);
                PlayerInfo[pPaintBallKills] = 0;
                PlayerInfo[pPaintBallVoted] = 0;
                PlayerInfo[pPaintBallVoted2] = 0;
                ResetPlayerWeaponsEx(i);
                ResetPlayerWeapons(i);
                SetPlayerArmourEx(i, 0);
                PlayerTextDrawShow(i, PaintBallText);
                PlayerTextDrawSetString(i, PaintBallText, "~g~WAITING FOR MORE PLAYERS TO JOIN...");
                   GameTextForPlayer(i, "~y~NOT ENOUGH PLAYERS TO START...", 5000, 5);
            }
        }
    }
    return 1;
}
public PrepareRoundPaintBall2()
{
    if(paintp[2] > 1)
     {
          new string[128];
        if(paintrs[2] >= 1)
         {
              paintrs[2]--;
            foreach(Player, i)
            {
                if(PlayerInfo[pPaintBallG] == 2)
                {
                    PlayerTextDrawShow(i, PaintBallText);
                    if(paintrs[2] > 9) format(string,sizeof(string),"PAINTBALL ROUND STARTS IN ~y~00:%d",paintrs[2]);
                    else format(string,sizeof(string),"PAINTBALL ROUND STARTS IN ~y~00:0%d",paintrs[2]);
                    PlayerTextDrawSetString(i, PaintBallText, string);
                }
            }
        }
        if(paintrs[2] == 2)
        {
            paintrs[2] = 0;
            paintt[2] = 301;
            KillTimer(preparepaint2);
            paintrun2 = SetTimer("PaintBallRun2", 1000, 1);
        }
      }
       else if(paintp[2] < 2)
    {
        paintt[2] = 0;
          paintrs[2] = 0;
          PaintWinner[2] = 999;
        PaintBallWinnerKills[2] = 0;
        paintvoteg[2][0] = 0;
        paintvoteg[2][1] = 0;
        paintvoteg[2][2] = 0;
        paintvotem[2][0] = 0;
        paintvotem[2][1] = 0;
        paintvotem[2][2] = 0;
        paintvotem[2][3] = 0;
        paintvotem[2][4] = 0;
        mapvoted[2] = 0;
        gunvoted[2] = 0;
        KillTimer(preparepaint2);
        KillTimer(paintrun2);
          foreach(Player, i)
        {
            if(PlayerInfo[pPaintBallG] == 2)
            {
                curatj = 0;
                for (new idd2 = 0; idd2 != 5; ++idd2) SendDeathMessageToPlayer(i, 1001, 1001, 1001);
                PlayerInfo[pPaintBallKills] = 0;
                PlayerInfo[pPaintBallVoted] = 0;
                PlayerInfo[pPaintBallVoted2] = 0;
                ResetPlayerWeaponsEx(i);
                ResetPlayerWeapons(i);
                SetPlayerArmourEx(i, 0);
                PlayerTextDrawShow(i, PaintBallText);
                PlayerTextDrawSetString(i, PaintBallText, "~g~WAITING FOR MORE PLAYERS TO JOIN...");
                   GameTextForPlayer(i, "~y~NOT ENOUGH PLAYERS TO START...", 5000, 5);
            }
        }
    }
    return 1;
}
public PrepareRoundPaintBall3()
{
    if(paintp[3] > 1)
     {
          new string[128];
        if(paintrs[3] >= 1)
         {
              paintrs[3]--;
            foreach(Player, i)
            {
                if(PlayerInfo[pPaintBallG] == 3)
                {
                    PlayerTextDrawShow(i, PaintBallText);
                    if(paintrs[3] > 9) format(string,sizeof(string),"PAINTBALL ROUND STARTS IN ~y~00:%d",paintrs[3]);
                    else format(string,sizeof(string),"PAINTBALL ROUND STARTS IN ~y~00:0%d",paintrs[3]);
                    PlayerTextDrawSetString(i, PaintBallText, string);
                }
            }
        }
        if(paintrs[3] == 2)
        {
            paintrs[3] = 0;
            paintt[3] = 601;
            KillTimer(preparepaint3);
            paintrun3 = SetTimer("PaintBallRun3", 1000, 1);
        }
      }
       else if(paintp[3] < 2)
    {
        paintt[3] = 0;
          paintrs[3] = 0;
          PaintWinner[3] = 999;
        PaintBallWinnerKills[3] = 0;
        paintvotem[3][0] = 0;
        paintvotem[3][1] = 0;
        paintvotem[3][2] = 0;
        paintvotem[3][3] = 0;
        paintvotem[3][4] = 0;
        mapvoted[3] = 0;
        KillTimer(preparepaint3);
        KillTimer(paintrun3);
          foreach(Player, i)
        {
            if(PlayerInfo[pPaintBallG] == 3)
            {
                curatj = 0;
                for (new idd2 = 0; idd2 != 5; ++idd2) SendDeathMessageToPlayer(i, 1001, 1001, 1001);
                PlayerInfo[pPaintBallKills] = 0;
                PlayerInfo[pPaintBallVoted] = 0;
                PlayerInfo[pPaintBallVoted2] = 0;
                ResetPlayerWeaponsEx(i);
                ResetPlayerWeapons(i);
                SetPlayerArmourEx(i, 0);
                PlayerTextDrawShow(i, PaintBallText);
                PlayerTextDrawSetString(i, PaintBallText, "~g~WAITING FOR MORE PLAYERS TO JOIN...");
                   GameTextForPlayer(i, "~y~NOT ENOUGH PLAYERS TO START...", 5000, 5);
            }
        }
    }
    return 1;
}
public PrepareRoundPaintBall4()
{
    if(paintp[4] > 1)
     {
          new string[128];
        if(paintrs[4] >= 1)
         {
              paintrs[4]--;
            foreach(Player, i)
            {
                if(PlayerInfo[pPaintBallG] == 4)
                {
                    PlayerTextDrawShow(i, PaintBallText);
                    if(paintrs[4] > 9) format(string,sizeof(string),"PAINTBALL ROUND STARTS IN ~y~00:%d",paintrs[4]);
                    else format(string,sizeof(string),"PAINTBALL ROUND STARTS IN ~y~00:0%d",paintrs[4]);
                    PlayerTextDrawSetString(i, PaintBallText, string);
                }
            }
        }
        if(paintrs[4] == 2)
        {
            paintrs[4] = 0;
            paintt[4] = 301;
            KillTimer(preparepaint4);
            paintrun4 = SetTimer("PaintBallRun4", 1000, 1);
        }
      }
       else if(paintp[4] < 2)
    {
        paintt[4] = 0;
          paintrs[4] = 0;
          PaintWinner[4] = 999;
        PaintBallWinnerKills[4] = 0;
        paintvotem[4][0] = 0;
        paintvotem[4][1] = 0;
        paintvotem[4][2] = 0;
        paintvotem[4][3] = 0;
        paintvotem[4][4] = 0;
        mapvoted[4] = 0;
        KillTimer(preparepaint4);
        KillTimer(paintrun4);
          foreach(Player, i)
        {
            if(PlayerInfo[pPaintBallG] == 4)
            {
                curatj = 0;
                for (new idd2 = 0; idd2 != 5; ++idd2) SendDeathMessageToPlayer(i, 1001, 1001, 1001);
                PlayerInfo[pPaintBallKills] = 0;
                PlayerInfo[pPaintBallVoted] = 0;
                PlayerInfo[pPaintBallVoted2] = 0;
                ResetPlayerWeaponsEx(i);
                ResetPlayerWeapons(i);
                SetPlayerArmourEx(i, 0);
                PlayerTextDrawShow(i, PaintBallText);
                PlayerTextDrawSetString(i, PaintBallText, "~g~WAITING FOR MORE PLAYERS TO JOIN...");
                   GameTextForPlayer(i, "~y~NOT ENOUGH PLAYERS TO START...", 5000, 5);
            }
        }
    }
    return 1;
}
public PaintBallRun1()
{
    paintt[1]--;
    if(paintp[1] > 1)
     {
          new string[128];
          if(paintt[1] >= 1)
        {
            if(paintt[1] == 300)
            {
                new maxim,weapon,maximm,map;
                for(new g = 0; g < 3; g++) if(paintvoteg[1][g] > maxim) { maxim = paintvoteg[1][g]; weapon = g;}
                if(gunvoted[1] > 0)
                {
                    if(weapon == 0) paintg[1] = 1;
                    if(weapon == 1) paintg[1] = 2;
                    if(weapon == 2) paintg[1] = 3;
                }
                for(new m = 0; m < 5; m++) if(paintvotem[1][m] > maximm) { maximm = paintvotem[1][m]; map = m;}
                if(mapvoted[1] > 0)
                {
                    if(map == 0) paintm[1] = 1;
                    if(map == 1) paintm[1] = 2;
                    if(map == 2) paintm[1] = 3;
                    if(map == 3) paintm[1] = 4;
                    if(map == 4) paintm[1] = 5;
                }
                foreach(Player, i)
                {
                     if(PlayerInfo[pPaintBallG] == 1)
                     {
                        SetPlayerSpawn(i);
                    }
                }
            }
            foreach(Player, i)
            {
                 if(PlayerInfo[pPaintBallG] == 1)
                 {
                       new stringg[64];
                       PlayerTextDrawShow(i, PaintBallText);
                    new minutes = floatround(paintt[1]/60),
                          seconds = floatround(paintt[1] - minutes*60);
                       if(seconds>9)format(stringg,sizeof(stringg),"0%d:%d",minutes,seconds);
                       else format(stringg,sizeof(stringg),"0%d:0%d",minutes,seconds);
                       format(string,sizeof(string),"PAINTBALL ROUND ENDS IN ~b~%s",stringg);
                    PlayerTextDrawSetString(i, PaintBallText, string);
                }
            }
        }
        if(paintt[1] == 2)
        {
            if(PaintWinner[1] != 0)
            {
                 foreach(Player, i)
                {
                      if(PlayerInfo[pPaintBallG] == 1)
                       {
                          format(string,sizeof(string),"Round over! Winner: %s - %d kills.",GetName(PaintWinner[1]),PaintBallWinnerKills[1]);
                        SendClientMessage(i, COLOR_YELLOW, string);
                        SendClientMessage(i, COLOR_YELLOW, "Use /votegun to vote for a gun. Use /votemap to vote for a map.");
                        ResetPlayerWeaponsEx(i);
                        ResetPlayerWeapons(i);
                        SetPlayerArmourEx(i, 0);
                        PlayerInfo[pPaintBallKills] = 0;
                        PlayerInfo[pPaintBallVoted] = 0;
                        PlayerInfo[pPaintBallVoted2] = 0;
                        for (new idd2 = 0; idd2 != 5; ++idd2) SendDeathMessageToPlayer(i, 1001, 1001, 1001);
                        curatj = 0;
                    }
                }
                KillTimer(paintrun1);
                paintt[1] = 0;
                paintrs[1] = 31;
                preparepaint1 = SetTimer("PrepareRoundPaintBall1", 1000, 1);
                paintg[1] = 1;
                PaintWinner[1] = 999;
                PaintBallWinnerKills[1] = 0;
                paintvoteg[1][0] = 0;
                paintvoteg[1][1] = 0;
                paintvoteg[1][2] = 0;
                paintvotem[1][0] = 0;
                paintvotem[1][1] = 0;
                paintvotem[1][2] = 0;
                paintvotem[1][3] = 0;
                paintvotem[1][4] = 0;
                mapvoted[1] = 0;
                gunvoted[1] = 0;
            }
        }
    }
    else if(paintp[1] < 2)
    {
        paintt[1] = 0;
          paintrs[1] = 0;
          PaintWinner[1] = 999;
        PaintBallWinnerKills[1] = 0;
        paintvoteg[1][0] = 0;
        paintvoteg[1][1] = 0;
        paintvoteg[1][2] = 0;
        paintvotem[1][0] = 0;
        paintvotem[1][1] = 0;
        paintvotem[1][2] = 0;
        paintvotem[1][3] = 0;
        paintvotem[1][4] = 0;
        mapvoted[1] = 0;
        gunvoted[1] = 0;
        KillTimer(preparepaint1);
        KillTimer(paintrun1);
          foreach(Player, i)
        {
            if(PlayerInfo[pPaintBallG] == 1)
            {
                for (new idd2 = 0; idd2 != 5; ++idd2) SendDeathMessageToPlayer(i, 1001, 1001, 1001);
                ResetPlayerWeaponsEx(i);
                ResetPlayerWeapons(i);
                SetPlayerArmourEx(i, 0);
                PlayerInfo[pPaintBallKills] = 0;
                PlayerInfo[pPaintBallVoted] = 0;
                PlayerInfo[pPaintBallVoted2] = 0;
                curatj = 0;
                PlayerTextDrawShow(i, PaintBallText);
                PlayerTextDrawSetString(i, PaintBallText, "~g~WAITING FOR MORE PLAYERS TO JOIN...");
                   GameTextForPlayer(i, "~y~NOT ENOUGH PLAYERS TO START...", 5000, 5);
            }
        }
    }
    return 1;
}
public PaintBallRun2()
{
    paintt[2]--;
    if(paintp[2] > 1)
     {
          new string[128];
          if(paintt[2] >= 1)
        {
            if(paintt[2] == 300)
            {
                new maxim,weapon,maximm,map;
                for(new g = 0; g < 3; g++) if(paintvoteg[2][g] > maxim) { maxim = paintvoteg[2][g]; weapon = g;}
                if(gunvoted[2] > 0)
                {
                    if(weapon == 0) paintg[2] = 1;
                    if(weapon == 1) paintg[2] = 2;
                    if(weapon == 2) paintg[2] = 3;
                }
                for(new m = 0; m < 5; m++) if(paintvotem[2][m] > maximm) { maximm = paintvotem[2][m]; map = m;}
                if(mapvoted[2] > 0)
                {
                    if(map == 0) paintm[2] = 1;
                    if(map == 1) paintm[2] = 2;
                    if(map == 2) paintm[2] = 3;
                    if(map == 3) paintm[2] = 4;
                    if(map == 4) paintm[2] = 5;
                }
                foreach(Player, i)
                {
                     if(PlayerInfo[pPaintBallG] == 2)
                     {
                        SetPlayerSpawn(i);
                    }
                }
            }
            foreach(Player, i)
            {
                 if(PlayerInfo[pPaintBallG] == 2)
                 {
                       new stringg[64];
                       PlayerTextDrawShow(i, PaintBallText);
                    new minutes = floatround(paintt[2]/60),
                          seconds = floatround(paintt[2] - minutes*60);
                       if(seconds>9)format(stringg,sizeof(stringg),"0%d:%d",minutes,seconds);
                       else format(stringg,sizeof(stringg),"0%d:0%d",minutes,seconds);
                       format(string,sizeof(string),"PAINTBALL ROUND ENDS IN ~b~%s",stringg);
                    PlayerTextDrawSetString(i, PaintBallText, string);
                }
            }
        }
        if(paintt[2] == 2)
        {
            if(PaintWinner[2] != 0)
            {
                 foreach(Player, i)
                {
                      if(PlayerInfo[pPaintBallG] == 2)
                       {
                          format(string,sizeof(string),"Round over! Winner: %s - %d kills.",GetName(PaintWinner[2]),PaintBallWinnerKills[2]);
                        SendClientMessage(i, COLOR_YELLOW, string);
                        SendClientMessage(i, COLOR_YELLOW, "Use /votegun to vote for a gun. Use /votemap to vote for a map.");
                        ResetPlayerWeaponsEx(i);
                        ResetPlayerWeapons(i);
                        SetPlayerArmourEx(i, 0);
                        PlayerInfo[pPaintBallKills] = 0;
                        PlayerInfo[pPaintBallVoted] = 0;
                        PlayerInfo[pPaintBallVoted2] = 0;
                        for (new idd2 = 0; idd2 != 5; ++idd2) SendDeathMessageToPlayer(i, 1001, 1001, 1001);
                        curatj = 0;
                    }
                }
                KillTimer(paintrun2);
                paintt[2] = 0;
                paintrs[2] = 31;
                preparepaint2 = SetTimer("PrepareRoundPaintBall2", 1000, 1);
                paintg[2] = 1;
                PaintWinner[2] = 999;
                PaintBallWinnerKills[2] = 0;
                paintvoteg[2][0] = 0;
                paintvoteg[2][1] = 0;
                paintvoteg[2][2] = 0;
                paintvotem[2][0] = 0;
                paintvotem[2][1] = 0;
                paintvotem[2][2] = 0;
                paintvotem[2][3] = 0;
                paintvotem[2][4] = 0;
                mapvoted[2] = 0;
                gunvoted[2] = 0;
            }
        }
    }
    else if(paintp[2] < 2)
    {
        paintt[2] = 0;
          paintrs[2] = 0;
          PaintWinner[2] = 999;
        PaintBallWinnerKills[2] = 0;
        paintvoteg[2][0] = 0;
        paintvoteg[2][1] = 0;
        paintvoteg[2][2] = 0;
        paintvotem[2][0] = 0;
        paintvotem[2][1] = 0;
        paintvotem[2][2] = 0;
        paintvotem[2][3] = 0;
        paintvotem[2][4] = 0;
        mapvoted[2] = 0;
        gunvoted[2] = 0;
        KillTimer(paintrun2);
        KillTimer(preparepaint2);
          foreach(Player, i)
        {
            if(PlayerInfo[pPaintBallG] == 2)
            {
                for (new idd2 = 0; idd2 != 5; ++idd2) SendDeathMessageToPlayer(i, 1001, 1001, 1001);
                ResetPlayerWeaponsEx(i);
                ResetPlayerWeapons(i);
                SetPlayerArmourEx(i, 0);
                PlayerInfo[pPaintBallKills] = 0;
                PlayerInfo[pPaintBallVoted] = 0;
                PlayerInfo[pPaintBallVoted2] = 0;
                curatj = 0;
                PlayerTextDrawShow(i, PaintBallText);
                PlayerTextDrawSetString(i, PaintBallText, "~g~WAITING FOR MORE PLAYERS TO JOIN...");
                   GameTextForPlayer(i, "~y~NOT ENOUGH PLAYERS TO START...", 5000, 5);
            }
        }
    }
    return 1;
}

 

si mai am si PaintBallRun3 respectIV PaintBallRun4

Sper sa ma puteti ajuta , va multumesc mult!

Link to comment
Share on other sites

  • 0

Nu imi dau seama unde ar putea fi bucata care scartaie , undeva pe aici ar trebui , am incercat sa fac un debugging si nimci , am tot testat cateva ore.

 

public PaintBallRun3()
{
    paintt[3]--;
    if(paintp[3] > 1)
     {
          new string[128];
          if(paintt[3] >= 1)
        {
            if(paintt[3] == 600)
            {
                new maximm,map;
                for(new m = 0; m < 5; m++) if(paintvotem[3][m] > maximm) { maximm = paintvotem[3][m]; map = m;}
                if(mapvoted[3] > 0)
                {
                    if(map == 0) paintm[3] = 1;
                    if(map == 1) paintm[3] = 2;
                    if(map == 2) paintm[3] = 3;
                    if(map == 3) paintm[3] = 4;
                    if(map == 4) paintm[3] = 5;
                }
                foreach(Player, i)
                {
                     if(PlayerInfo[pPaintBallG] == 3)
                     {
                        SetPlayerSpawn(i);
                    }
                }
            }
            foreach(Player, i)
            {
                 if(PlayerInfo[pPaintBallG] == 3)
                 {
                       new stringg[64];
                       PlayerTextDrawShow(i, PaintBallText);
                    new minutes = floatround(paintt[3]/60),
                          seconds = floatround(paintt[3] - minutes*60);
                       if(seconds>9)format(stringg,sizeof(stringg),"0%d:%d",minutes,seconds);
                       else format(stringg,sizeof(stringg),"0%d:0%d",minutes,seconds);
                       format(string,sizeof(string),"PAINTBALL ROUND ENDS IN ~b~%s",stringg);
                    PlayerTextDrawSetString(i, PaintBallText, string);
                }
            }
        }
        if(paintt[3] == 2)
        {
            if(PaintWinner[3] != 0)
            {
                 foreach(Player, i)
                {
                      if(PlayerInfo[pPaintBallG] == 3)
                       {
                          format(string,sizeof(string),"Round over! Winner: %s - %d kills.",GetName(PaintWinner[3]),PaintBallWinnerKills[3]);
                        SendClientMessage(i, COLOR_YELLOW, string);
                        SendClientMessage(i, COLOR_YELLOW, "Use /votemap to vote for a map.");
                        ResetPlayerWeaponsEx(i);
                        ResetPlayerWeapons(i);
                        SetPlayerArmourEx(i, 0);
                        PlayerInfo[pPaintBallKills] = 0;
                        PlayerInfo[pPaintBallVoted] = 0;
                        PlayerInfo[pPaintBallVoted2] = 0;
                        for (new idd2 = 0; idd2 != 5; ++idd2) SendDeathMessageToPlayer(i, 1001, 1001, 1001);
                        curatj = 0;
                    }
                }

Link to comment
Share on other sites

  • 0

Mecancia prorpiu-zisa a acestui sistem e de a "se juca" 3 runde de paint pana se ajunge la max kills 29

Problema este ca dupa terminare primei runde de 5 minute , ar trebui teoretic sa ma bage in looby-ul de asteptare de 30 de secunde daca playerii sunt mai egali sau mai multi de 2 caz contrar sa imi scuipe "Waiting for other players".

Totusi mie nu imi trece de prima runda, dupa cele 5 minute , in ultima secunda (00:01) se opreste si ramane asa, totusi odata am incercat si m-a bagat in cele 30 de secunde de asteptare din runda a 2-a. Posibil sa fie ceva exceptii ce nu le-am observat sau conditii.

 

            if(PlayerInfo[killerid][pPaintBallKills] == 29 && PlayerInfo[killerid][pPaintBallG] == 3)
            {
                foreach(Player, i)
                {
                      if(PlayerInfo[pPaintBallG] == 3)
                       {
                          format(string,sizeof(string),"Round over! Winner: %s - 29 kills.",GetName(killerid));
                        SendClientMessage(i, COLOR_YELLOW, string);
                        SendClientMessage(i, COLOR_YELLOW, "Use /votemap to vote for a map.");
                        ResetPlayerWeaponsEx(i);
                        ResetPlayerWeapons(i);
                        SetPlayerArmourEx(i, 0);
                        PlayerInfo[pPaintBallKills] = 0;
                        PlayerInfo[pPaintBallVoted] = 0;
                        PlayerInfo[pPaintBallVoted2] = 0;
                        for (new idd2 = 0; idd2 != 5; ++idd2) SendDeathMessageToPlayer(i, 1001, 1001, 1001);
                    }
                }
                KillTimer(paintrun3);
                paintt[3] = 0;
                paintrs[3] = 31;
                preparepaint3 = SetTimer("PrepareRoundPaintBall3", 1000, 1);
                PaintWinner[3] = 999;
                PaintBallWinnerKills[3] = 0;
                paintvotem[3][0] = 0;
                paintvotem[3][1] = 0;
                paintvotem[3][2] = 0;
                paintvotem[3][3] = 0;
                paintvotem[3][4] = 0;
                mapvoted[3] = 0;
            }
            if(PlayerInfo[killerid][pPaintBallKills] > PaintBallWinnerKills[PlayerInfo[playerid][pPaintBallG]])
            {
                PaintWinner[PlayerInfo[playerid][pPaintBallG]] = killerid;
                PaintBallWinnerKills[PlayerInfo[playerid][pPaintBallG]] = PlayerInfo[killerid][pPaintBallKills];
                foreach(Player, i)
                {
                    if(IsPlayerConnected(i))
                    {
                        if(PlayerInfo[pPaintBallG] == PlayerInfo[playerid][pPaintBallG])
                        {
                            format(string,sizeof(string),"%s is in the lead with %d kills.",GetName(killerid),PaintBallWinnerKills[PlayerInfo[playerid][pPaintBallG]]);
                            SendClientMessage(i, COLOR_YELLOW, string);
                        }
                    }
                }
            }
            return 1;
        }

Link to comment
Share on other sites

  • 0

Aici

if(PlayerInfo[killerid][pPaintBallKills] == 29 && PlayerInfo[killerid][pPaintBallG] == 3)

nu voiai sa pui || (sau) in loc de && (si)? Nu stiu ce face BallG si nu pot sa stau sa ma uit pe tot codul.

Aici

if(PlayerInfo[pPaintBallG] == 3)

de ce verifici iar? Una din conditiile de mai sus o sa fie adevarata (poate ai vrut sa verifici daca sunt 29 de kill-uri si sa afisezi mesajul cu kill-uri).

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Similar Content

    • By Monkey2K
      Salut recent am descarcat panelul bigzone ca sa incep sa lucrez pe el dar imi da eroare aceasta (https://imgur.com/a/QU5nUBM) pe care nu o pot rezolva, am mai intmpinat erori dar le-am rezolvat (Dar pe aceasta nu reusesc) 
    • By r3f13x
      Salut, Am si eu o problema, daca se pricepe cineva poate ma ajuta si pe mine. 
      De la un timp am o eroare la forum si nu stiu de ce, asa random. 
      Daca ma poate ajuta cineva.
       
      "Some functions are enabled on your server which have the potential to cause serious damage to your community or server. If you are in a shared hosting environment, some of these functions may bypass the restrictions which prevent one account on the server affecting another. Their presence also increases the amount of damage that could be caused if your AdminCP is compromised.
      Since Invision Community, and most other web applications do not use these functions, we recommend disabling them on your server, at least within the directory that your community is installed in. You should contact your hosting provider or system administrator and ask them to be added to the disable_functions PHP setting.
      [10:59 AM]
      la setarea PHP disable_functions." 
       
    • By EdySt
      Am si eu o problema, cand compilez un gm burned sau adaug un progress bar cv 
      D:\DinC\Desktop\gamemodes\L-GM.pwn(42) : fatal error 100: cannot read from file
      cand compilez cu pawn citeste, dc?
      Apropo, pawn cu care compileaza sublime am incercat sa-l sterg si sa-l pun pe asta, dar la fel tot  nu citeste
    • By Funnk
      Ma poate ajuta cineva cu aceste erori/warning-uri?
      E:\pawno\include\mSelection.inc(207) : warning 219: local variable "x" shadows a variable at a preceding level
      E:\pawno\include\mSelection.inc(222) : warning 219: local variable "x" shadows a variable at a preceding level
      E:\pawno\include\mSelection.inc(426) : warning 219: local variable "x" shadows a variable at a preceding level
      E:\pawno\include\mSelection.inc(556) : warning 219: local variable "x" shadows a variable at a preceding level
      E:\pawno\include\fly.inc(45) : warning 219: local variable "x" shadows a variable at a preceding level
      E:\pawno\include\fly.inc(45) : warning 219: local variable "y" shadows a variable at a preceding level
      E:\pawno\include\fly.inc(60) : warning 219: local variable "x" shadows a variable at a preceding level
      E:\pawno\include\fly.inc(60) : warning 219: local variable "y" shadows a variable at a preceding level
      E:\pawno\include\fly.inc(108) : warning 219: local variable "x" shadows a variable at a preceding level
      E:\pawno\include\fly.inc(108) : warning 219: local variable "y" shadows a variable at a preceding level
      E:\pawno\include\OPA.inc(57) : warning 219: local variable "x" shadows a variable at a preceding level
      E:\pawno\include\OPA.inc(58) : warning 219: local variable "y" shadows a variable at a preceding level
      E:\pawno\include\OPA.inc(142) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
      E:\pawno\include\OPA.inc(144) : warning 219: local variable "x" shadows a variable at a preceding level
      E:\pawno\include\OPA.inc(145) : warning 219: local variable "y" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(46) : error 017: undefined symbol "AntiDeAMX"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(2955) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4763) : error 004: function "vUpdate" is not implemented
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4874) : warning 219: local variable "y" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4874) : warning 219: local variable "h" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4893) : warning 219: local variable "y" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4893) : warning 219: local variable "h" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4902) : error 004: function "SS" is not implemented
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(4962) : error 004: function "SS" is not implemented
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5013) : error 004: function "ProxDetector" is not implemented
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5166) : error 004: function "SS" is not implemented
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5168) : error 004: function "SS" is not implemented
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5185) : error 004: function "SS" is not implemented
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5344) : error 017: undefined symbol "PutPlayerInVehicleEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5363) : error 017: undefined symbol "PutPlayerInVehicleEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5382) : error 017: undefined symbol "PutPlayerInVehicleEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5401) : error 017: undefined symbol "PutPlayerInVehicleEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(5420) : error 017: undefined symbol "PutPlayerInVehicleEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(6054) : warning 219: local variable "health" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(6056) : error 017: undefined symbol "GetPlayerHealthEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(6061) : error 017: undefined symbol "SetPlayerHealthEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(6065) : error 017: undefined symbol "SetPlayerHealthEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(6494) : error 017: undefined symbol "SetPlayerPosEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(6725) : error 004: function "SS" is not implemented
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(7234) : warning 219: local variable "x" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(7234) : warning 219: local variable "y" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(7619) : warning 219: local variable "health" shadows a variable at a preceding level
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(7622) : error 017: undefined symbol "GetPlayerHealthEx"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(7627) : error 017: undefined symbol "Carspeed"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(8360) : error 017: undefined symbol "NumIp"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(8368) : error 017: undefined symbol "AntiFlood_InitPlayer"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(10084) : error 017: undefined symbol "ClearWanted"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(10112) : error 017: undefined symbol "BanCheck"
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(10247) : error 004: function "CrimInRange" is not implemented
      C:\Users\Crysty\Desktop\gamemode sa\gamemode sa\gamemodes\engame.pwn(10470) : error 017: undefined symbol "SetPlayerArmourEx"
      Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase

      26 Errors.
      Asa arata comanda inainte sa o modific si dupa ce am moficat-o:
      https://pastebin.com/rDN4eMrn
    • By Funnk
      Salut, am si eu o problema  la comanda /towcar
      Am aceasta comanda in pawno https://pastebin.com/a271BXPZ
      Cand dau compilare imi arata asa https://imgur.com/a/YzJCh
      Ce pot face?
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.