Jump to content
  • 0

Problema Time la paintball


Style.

Question

Problema intalnita (descriere): Salutare, meciul la paint dureaza 05:00 minute cand se termina ramane la 00:01 nu inteleg de ce nu se termina meciul...
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu): http://pastebin.com/12H3mhWe
Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Am incercat, nu imi pot da seama ce are :(

Edited by Style.
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
public PrepareRoundPaintBall1()
{
    if(paintp[1] > 1)
    {
        new string[128];
        if(paintrs[1] >= 1)
        {
            paintrs[1]--;
            foreach(Player, i)
            {
                if(PlayerInfo[i][pPaintBallG] == 1)
                {
                    PlayerTextDrawShow(i, PaintBallText[i]);
                    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[i], string);
                }
            }
        }
        if(paintrs[1] == 2)
        {
            paintrs[1] = 0;
            paintt[1] = 299;
            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[i][pPaintBallG] == 1)
            {
                curatj[i] = 0;
                for (new idd2 = 0; idd2 != 5; ++idd2) SendDeathMessageToPlayer(i, 1001, 1001, 1001);
                PlayerInfo[i][pPaintBallKills] = 0;
                PlayerInfo[i][pPaintBallVoted] = 0;
                PlayerInfo[i][pPaintBallVoted2] = 0;
                ResetPlayerWeaponsEx(i);
                ResetPlayerWeapons(i);
                SetPlayerArmourEx(i, 0);
                PlayerTextDrawShow(i, PaintBallText[i]);
                PlayerTextDrawSetString(i, PaintBallText[i], "~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);
                        SetPlayerHealthEx(i, 100);
                    }
                }
            }
            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.",GetPName(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;
}

Vezi daca merge acum

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.