Jump to content
  • 0

Paint problema


Cordyandrey

Question

Recommended Posts

  • 0
 

 

[13:13:55] [chat] [Ruess.MEOW]: ak
[13:13:57] [chat] [[R]Cordy]: a
[13:13:57] [chat] [Ruess.MEOW]: fwqifqw
 error 4: "Array index out of bounds"
[13:14:10] [debug]  Accessing element at negative index -1
[13:14:10] [debug] AMX backtrace:
[13:14:10] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298[13:14:05] [debug] Run time error 4: "Array index out of bounds"
[13:14:05] [debug]  Accessing element at negative index -1
[13:14:05] [debug] AMX backtrace:
[13:14:05] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:06] [debug] Run time error 4: "Array index out of bounds"
[13:14:06] [debug]  Accessing element at negative index -1
[13:14:06] [debug] AMX backtrace:
[13:14:06] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:07] [debug] Run time error 4: "Array index out of bounds"
[13:14:07] [debug]  Accessing element at negative index -1
[13:14:07] [debug] AMX backtrace:
[13:14:07] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:07] [chat] [[R]Cordy]: wadasda
[13:14:08] [debug] Run time error 4: "Array index out of bounds"
[13:14:08] [debug]  Accessing element at negative index -1
[13:14:08] [debug] AMX backtrace:
[13:14:08] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:09] [debug] Run time error 4: "Array index out of bounds"
[13:14:09] [debug]  Accessing element at negative index -1
[13:14:09] [debug] AMX backtrace:
[13:14:09] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:10] [chat] [[R]Cordy]: of
[13:14:10] [death] [R]Cordy died 255
[13:14:10] [debug] Run time
[13:14:11] [debug] Run time error 4: "Array index out of bounds"
[13:14:11] [debug]  Accessing element at negative index -1
[13:14:11] [debug] AMX backtrace:
[13:14:11] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:12] [chat] [[R]Cordy]: iarr
[13:14:12] [debug] Run time error 4: "Array index out of bounds"
[13:14:12] [debug]  Accessing element at negative index -1
[13:14:12] [debug] AMX backtrace:
[13:14:12] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:13] [debug] Run time error 4: "Array index out of bounds"
[13:14:13] [debug]  Accessing element at negative index -1
[13:14:13] [debug] AMX backtrace:
[13:14:13] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:15] [debug] Run time error 4: "Array index out of bounds"
[13:14:15] [debug]  Accessing element at negative index -1
[13:14:15] [debug] AMX backtrace:
[13:14:15] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:16] [debug] Run time error 4: "Array index out of bounds"
[13:14:16] [debug]  Accessing element at negative index -1
[13:14:16] [debug] AMX backtrace:
[13:14:16] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:16] [chat] [[R]Cordy]: scoul?
[13:14:17] [debug] Run time error 4: "Array index out of bounds"
[13:14:17] [debug]  Accessing element at negative index -1
[13:14:17] [debug] AMX backtrace:
[13:14:17] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:18] [debug] Run time error 4: "Array index out of bounds"
[13:14:18] [debug]  Accessing element at negative index -1
[13:14:18] [debug] AMX backtrace:
[13:14:18] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:18] [chat] [Ruess.MEOW]: g
[13:14:19] [chat] [[R]Cordy]: s-a resetat macar?
[13:14:19] [debug] Run time error 4: "Array index out of bounds"
[13:14:19] [debug]  Accessing element at negative index -1
[13:14:19] [debug] AMX backtrace:
[13:14:19] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:20] [chat] [[R]Cordy]: ofof
[13:14:20] [debug] Run time error 4: "Array index out of bounds"
[13:14:20] [debug]  Accessing element at negative index -1
[13:14:20] [debug] AMX backtrace:
[13:14:20] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:21] [debug] Run time error 4: "Array index out of bounds"
[13:14:21] [debug]  Accessing element at negative index -1
[13:14:21] [debug] AMX backtrace:
[13:14:21] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:22] [debug] Run time error 4: "Array index out of bounds"
[13:14:22] [debug]  Accessing element at negative index -1
[13:14:22] [debug] AMX backtrace:
[13:14:22] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:23] [debug] Run time error 4: "Array index out of bounds"
[13:14:23] [debug]  Accessing element at negative index -1
[13:14:23] [debug] AMX backtrace:
[13:14:23] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:24] [debug] Run time error 4: "Array index out of bounds"
[13:14:24] [debug]  Accessing element at negative index -1
[13:14:24] [debug] AMX backtrace:
[13:14:24] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:25] [debug] Run time error 4: "Array index out of bounds"
[13:14:25] [debug]  Accessing element at negative index -1
[13:14:25] [debug] AMX backtrace:
[13:14:25] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:26] [debug] Run time error 4: "Array index out of bounds"
[13:14:26] [debug]  Accessing element at negative index -1
[13:14:26] [debug] AMX backtrace:
[13:14:26] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:27] [chat] [[R]Cordy]: ba dar
[13:14:27] [debug] Run time error 4: "Array index out of bounds"
[13:14:27] [debug]  Accessing element at negative index -1
[13:14:27] [debug] AMX backtrace:
[13:14:27] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:28] [debug] Run time error 4: "Array index out of bounds"
[13:14:28] [debug]  Accessing element at negative index -1
[13:14:28] [debug] AMX backtrace:
[13:14:28] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:29] [debug] Run time error 4: "Array index out of bounds"
[13:14:29] [debug]  Accessing element at negative index -1
[13:14:29] [debug] AMX backtrace:
[13:14:29] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:30] [chat] [[R]Cordy]: doar la castigator ce naiba
[13:14:30] [debug] Run time error 4: "Array index out of bounds"
[13:14:30] [debug]  Accessing element at negative index -1
[13:14:30] [debug] AMX backtrace:
[13:14:30] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:31] [death] [R]Cordy died 255
[13:14:31] [debug] Run time error 4: "Array index out of bounds"
[13:14:31] [debug]  Accessing element at negative index -1
[13:14:31] [debug] AMX backtrace:
[13:14:31] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:32] [debug] Run time error 4: "Array index out of bounds"
[13:14:32] [debug]  Accessing element at negative index -1
[13:14:32] [debug] AMX backtrace:
[13:14:32] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:33] [debug] Run time error 4: "Array index out of bounds"
[13:14:33] [debug]  Accessing element at negative index -1
[13:14:33] [debug] AMX backtrace:
[13:14:33] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:35] [debug] Run time error 4: "Array index out of bounds"
[13:14:35] [debug]  Accessing element at negative index -1
[13:14:35] [debug] AMX backtrace:
[13:14:35] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:36] [debug] Run time error 4: "Array index out of bounds"
[13:14:36] [debug]  Accessing element at negative index -1
[13:14:36] [debug] AMX backtrace:
[13:14:36] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:37] [debug] Run time error 4: "Array index out of bounds"
[13:14:37] [debug]  Accessing element at negative index -1
[13:14:37] [debug] AMX backtrace:
[13:14:37] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:38] [debug] Run time error 4: "Array index out of bounds"
[13:14:38] [debug]  Accessing element at negative index -1
[13:14:38] [debug] AMX backtrace:
[13:14:38] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298
[13:14:39] [debug] Run time error 4: "Array index out of bounds"
[13:14:39] [debug]  Accessing element at negative index -1
[13:14:39] [debug] AMX backtrace:
[13:14:39] [debug] #0 0030e844 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\Cypher-QLT\gamemodes\gmm - sterge sterge.pwn:30298

[spoiler]
		

		

Asta imi da la sfarsitul rundei cand nu primeste playerul reset la scor si la arme!

Edited by Cordyandrey
Link to comment
Share on other sites

  • 0

Aici ar fi linia 30298

	                }                                      LINIA 30298 
            }            
            
            if(PaintType[i] != 0 && PlayersOnPaint(PaintType[i]-1) >= 2) {
                new pp = PaintType[i]-1;
                if(pp < 2) {
                    format(string, sizeof(string), "Paintball time: %s~n~Current map: %s~n~Stats: %d kills, %d deaths.~n~Total score: %d~n~Best player: %s (kills: %d)~n~%d players in paintball.",
                    CalculeazaTimp2(PaintTime[pp]), MapName(pp), PKills[i], PDeaths[i], PKills[i]-PDeaths[i], GetName(PaintballWinner[pp]), PKills[PaintballWinner[pp]], PlayersOnPaint(pp));
                }
                else {
                    new masadenume[32];
                    GetWeaponNameEx(GetPlayerWeapon(i), masadenume, sizeof(masadenume));
	                    format(string, sizeof(string), "Paintball time: %s~n~Current map: %s~n~Stats: %d kills, %d deaths.~n~Total score: %d~n~Level %d, Weapon: %s~n~Best player: %s (kills: %d)~n~%d players in paintball.",
                    CalculeazaTimp2(PaintTime[pp]), MapName(pp), PKills[i], PDeaths[i], PKills[i]-PDeaths[i], GetPaintLevel(i), masadenume, GetName(PaintballWinner[pp]), PKills[PaintballWinner[pp]], PlayersOnPaint(pp));
                }
                
                if(PaintTime[pp] == 0 && PaintballWinner[pp] != -1) {
                    for(new m = 0; m < 5; m++) SendDeathMessageToPlayer(i, 1001, 1001, 200);
                    format(string, sizeof(string), "Statistica ta in aceasta runda: %d ucideri si %d decese.", PKills[i], PDeaths[i]);
                    SCM(i, COLOR_YELLOW, string);                    
                    format(swinner, 256, "* %s a castigat runda cu %d ucideri.", GetName(PaintballWinner[pp]), PKills[PaintballWinner[pp]]);                                
                    PKills[i] = 0, PDeaths[i] = 0;
                    ResetWeapons(i);                
                    PaintballWinnerScore[pp] = 0;                    
                    SendPaintMessage(PaintType[i], COLOR_YELLOW, swinner);
                    PaintballWinner[pp] = -1;                    
                }
                if(PaintTime[pp] != 0 && PaintText[pp] == 0) {
                    PlayerTextDrawSetString(i, PaintTD, string);
                    PlayerTextDrawShow(i, PaintTD);                    
                }    
                else {                    
                    PlayerTextDrawHide(i, PaintTD);    
                }    
            }
            else PlayerTextDrawHide(i, PaintTD);               
	            if(PlayerInfo[i][pWantedLevel] >= 1) {
                format(string, sizeof(string), "Nivel wanted actual: ~y~%d~n~~w~~h~Scade un nivel in: ~y~%d min.", PlayerInfo[i][pWantedLevel], 10-WantedTime[i]);
                PlayerTextDrawSetString(i, WantedTD[i], string);
                PlayerTextDrawShow(i, WantedTD[i]);
            }
	

Link to comment
Share on other sites

  • 0


PlayerInfo[killerid][pPaintKills][PaintType[killerid]-1] ++;
            switch(PaintType[killerid]-1) {
                case 0: UpdateVar(killerid, "PaintKills1", PlayerInfo[killerid][pPaintKills][PaintType[killerid]-1]);
                case 1: UpdateVar(killerid, "PaintKills2", PlayerInfo[killerid][pPaintKills][PaintType[killerid]-1]);
                case 2: UpdateVar(killerid, "PaintKills3", PlayerInfo[killerid][pPaintKills][PaintType[killerid]-1]);                
            }    
            
            PlayerInfo[playerid][pPaintDeaths][PaintType[playerid]-1] ++;        
            switch(PaintType[playerid]-1) {
                case 0: UpdateVar(playerid, "PaintDeaths1", PlayerInfo[playerid][pPaintDeaths][PaintType[playerid]-1]);
                case 1: UpdateVar(playerid, "PaintDeaths2", PlayerInfo[playerid][pPaintDeaths][PaintType[playerid]-1]);
                case 2:    UpdateVar(playerid, "PaintDeaths3", PlayerInfo[playerid][pPaintDeaths][PaintType[playerid]-1]);            
            }    
            PKills[killerid] ++;
            PDeaths[playerid] ++;
            if(PaintType[killerid] == 3 && PaintType[playerid] == 3) {
                if(GetPaintLevel(playerid) == ? {
                    foreach(Player,i) {
                        if(IsPlayerConnected(i) && IsPlayerLogged[i] == 1) {
                            if(PaintType[i] == PaintType[killerid]) {
                                new pp = PaintType[killerid]-1;
                                for(new m = 0; m < 5; m++) SendDeathMessageToPlayer(i, 1001, 1001, 200);
                                format(string, sizeof(string), "* %s a castigat runda deoarece a omorat pe %s cu cutitul.", GetName(killerid), GetName(playerid));
                                SendPaintMessage(PaintType[i]-1, COLOR_YELLOW, string);
                                PaintTime[pp] = 300;
                                PKills[i] = 0, PDeaths[i] = 0;
                                PaintballWinner[pp] = i;
                                PaintballWinnerScore[pp] = 0;
                                SpawnPlayer(i);
                            }
                        }
                    }
                }
                else GiveSkillWeapon(killerid);
            }
            foreach(Player,i) if(PaintType[i] == PaintType[playerid] && PlayerInfo[i][pAdmin] == 0) SendDeathMessageToPlayer(i, killerid, playerid, reason);
            if(PKills[killerid] > PaintballWinnerScore[PaintType[playerid]-1]) {
                PaintballWinner[PaintType[playerid]-1]  = killerid;
                PaintballWinnerScore[PaintType[playerid]-1] = PKills[killerid];
            }
        }

Link to comment
Share on other sites

  • 0
Incearca asa:

            if(PaintType != 0 && PlayersOnPaint(PaintType-1) >= 2) {
                new pp = PaintType-1;
                if(pp < 2) {
                    format(string, sizeof(string), "Paintball time: %s~n~Current map: %s~n~Stats: %d kills, %d deaths.~n~Total score: %d~n~Best player: %s (kills: %d)~n~%d players in paintball.",
                    CalculeazaTimp2(PaintTime[pp]), MapName(pp), PKills, PDeaths, PKills-PDeaths, GetName(PaintballWinner[pp]), PKills[PaintballWinner[pp]], PlayersOnPaint(pp));
                }
                else {
                    new masadenume[32];
                    GetWeaponNameEx(GetPlayerWeapon(i), masadenume, sizeof(masadenume));

                    format(string, sizeof(string), "Paintball time: %s~n~Current map: %s~n~Stats: %d kills, %d deaths.~n~Total score: %d~n~Level %d, Weapon: %s~n~Best player: %s (kills: %d)~n~%d players in paintball.",
                    CalculeazaTimp2(PaintTime[pp]), MapName(pp), PKills, PDeaths, PKills-PDeaths, GetPaintLevel(i), masadenume, GetName(PaintballWinner[pp]), PKills[PaintballWinner[pp]], PlayersOnPaint(pp));
                }
                
                if(PaintTime[pp] == 0 && PaintballWinner[pp] != -1) {
                    for(new m = 0; m < 5; m++) SendDeathMessageToPlayer(i, 1001, 1001, 200);
                    format(string, sizeof(string), "Statistica ta in aceasta runda: %d ucideri si %d decese.", PKills, PDeaths);
                    SCM(i, COLOR_YELLOW, string);                    
                    format(swinner, 256, "* %s a castigat runda cu %d ucideri.", GetName(PaintballWinner[pp]), PKills[PaintballWinner[pp]]);                                
                    PKills = 0, PDeaths = 0;
                    ResetWeapons(i);                
                    PaintballWinnerScore[pp] = 0;                    
                    SendPaintMessage(PaintType, COLOR_YELLOW, swinner);
                    PaintballWinner[pp] = -1;                    
                }
                if(PaintTime[pp] != 0 && PaintText[pp] == 0) {
                    PlayerTextDrawSetString(i, PaintTD, string);
                    PlayerTextDrawShow(i, PaintTD);                    
                }    
                else {                    
                    PlayerTextDrawHide(i, PaintTD);    
                }    
            }
            else PlayerTextDrawHide(i, PaintTD);               

            if(PlayerInfo[pWantedLevel] >= 1) {
                format(string, sizeof(string), "Nivel wanted actual: ~y~%d~n~~w~~h~Scade un nivel in: ~y~%d min.", PlayerInfo[pWantedLevel], 10-WantedTime);
                PlayerTextDrawSetString(i, WantedTD, string);
                PlayerTextDrawShow(i, WantedTD);
            }

Link to comment
Share on other sites

  • 0
PaintType[]

Poate sa fie si 0? In sensul in care tipul de paint e 0,1 ,2 etc. Pentru ca e singuru luru pe care il vad s afie -1 si cu care incerci sa accesezi indexuri

In rest pare ok zic eu nu ca as intelege mare lucru din script

Edited by Banditul
Link to comment
Share on other sites

  • 0

Sper ca am aratat ce trebuia... chiar nu gasesc exact:

	function CheckPaintball() {
    foreach(Player, i) {
        if(IsPlayerConnected(i) && IsPlayerLogged[i] == 1 && GetPlayerScore(i) != 0) {
            for(new x = 3; x < 3; x++) {
                if(PlayersOnPaint(x) < 2 && PaintTime[x] != -1) {
                    PaintTime[x] = -1;
                    if(PaintType[i] == i+1) {
                        new pp = PaintType[i]-1;
                        ResetPlayerWeapons(i);
                        SCM(i, COLOR_YELLOW, "Runda a fost intrerupta deoarece ai ramas singur.");
                        PlayerTextDrawHide(i, PaintTD);
	                        PKills[i] = 0, PDeaths[i] = 0;
                        PKills[PaintballWinner[pp]] = 0; PDeaths[PaintballWinner[pp]] = 0;
                        //SpawnPlayer(PaintballWinner[pp]);
                        PaintballWinner[pp] = i;
                        ResetWeapons(i);
                        ResetWeapons(PaintballWinner[pp]);                    
                        PaintballWinnerScore[pp] = 0;
                        
                        for(new m = 0; m < 5; m++) SendDeathMessageToPlayer(i, 1001, 1001, 200);
                    }
                }        
            }    
        }    
    }    
    return 1;
}
	
Edited by Cordyandrey
Link to comment
Share on other sites

  • 0

function PlayersOnPaint(paintid) {
    new x;
    foreach(Player, i) {
        switch(paintid) {
            case 0: if(PaintType == 1) x++; // classic
            case 1: if(PaintType == 2) x++; // armour
            case 2: if(PaintType == 3) x++; // gungame
        }
    }
    return x;
}

Link to comment
Share on other sites

  • 0

Revin cu linia, deci apare eroarea asta:

	[18:04:52] [debug] AMX backtrace:
[18:04:52] [debug] #0 0030f5a0 in public Timers () at D:\JOCURI\SERVER\Cypher-QLT\CypherZ\gamemodes\gmm.pwn:30436
	

Iar linia este: (Am modificat cu 1 sa pot juca singur pe localhost, stiu ca trebuie sa pun 2 mai sus. Dar nu cred ca asta e cauza resetului la scor... sau la arme). Pana la urma daca nu gasesc rezolvarea nu ma poate ajuta cineva cu un script ca atunci cand se termina runda sa-i dea afara pe toti dupa ce apare scrisul "x a castigat runda" etc.. asa n-ar mai fi problema.

	if(PaintType[i] != 0 && PlayersOnPaint(PaintType[i]-1) >= 1) { // modificat aici in loc de 1 e 2
                new pp = PaintType[i]-1;
                if(pp < 2) {
LINIA PROBLEMA:                 format(string, sizeof(string), "Paintball time: %s~n~Current map: %s~n~Stats: %d kills, %d deaths.~n~Total score: %d~n~Best player: %s (kills: %d)~n~%d players in paintball.",
                    CalculeazaTimp2(PaintTime[pp]), MapName(pp), PKills[i], PDeaths[i], PKills[i]-PDeaths[i], GetName(PaintballWinner[pp]), PKills[PaintballWinner[pp]], PlayersOnPaint(pp));
                }
                else {
                    new masadenume[32];
                    GetWeaponNameEx(GetPlayerWeapon(i), masadenume, sizeof(masadenume));
                    format(string, sizeof(string), "Paintball time: %s~n~Current map: %s~n~Stats: %d kills, %d deaths.~n~Total score: %d~n~Level %d, Weapon: %s~n~Best player: %s (kills: %d)~n~%d players in paintball.",
                    CalculeazaTimp2(PaintTime[pp]), MapName(pp), PKills[i], PDeaths[i], PKills[i]-PDeaths[i], GetPaintLevel(i), masadenume, GetName(PaintballWinner[pp]), PKills[PaintballWinner[pp]], PlayersOnPaint(pp));
                }
	                if(PaintTime[pp] == 0 && PaintballWinner[pp] != -1) {
                    for(new m = 0; m < 5; m++) SendDeathMessageToPlayer(i, 1001, 1001, 200);
                    format(string, sizeof(string), "Statistica ta in aceasta runda: %d ucideri si %d decese.", PKills[i], PDeaths[i]);
                    SCM(i, COLOR_YELLOW, string);
                    format(swinner, 256, "* %s a castigat runda cu %d ucideri.", GetName(PaintballWinner[pp]), PKills[PaintballWinner[pp]]);
                    PKills[i] = 0, PDeaths[i] = 0;
                    ResetWeapons(i);
                    PaintballWinnerScore[pp] = 0;
                    SendPaintMessage(PaintType[i], COLOR_YELLOW, swinner);
                    PaintballWinner[pp] = -1;
                }
                if(PaintTime[pp] != 0 && PaintText[pp] == 0) {
                    PlayerTextDrawSetString(i, PaintTD, string);
                    PlayerTextDrawShow(i, PaintTD);
                }
                else {
                    PlayerTextDrawHide(i, PaintTD);
                }
            }
            else PlayerTextDrawHide(i, PaintTD);
	
Edited by Cordyandrey
Link to comment
Share on other sites

  • 0

Linia 30436 este asta: Am precizat cu un post mai sus une scrie "Linia problema" aia e linia 30436. Imediat caut acum si ppaintkills

format(string, sizeof(string), "Paintball time: %s~n~Current map: %s~n~Stats: %d kills, %d deaths.~n~Total score: %d~n~Best player: %s (kills: %d)~n~%d players in paintball.",
                    CalculeazaTimp2(PaintTime[pp]), MapName(pp), PKills[i], PDeaths[i], PKills[i]-PDeaths[i], GetName(PaintballWinner[pp]), PKills[PaintballWinner[pp]], PlayersOnPaint(pp));
Link to comment
Share on other sites

  • 0

Asta e tot ce am gasit legat de pPaintKills, pPaintDeaths... iar pKills si pDeaths am pKills[max_players]

	enum pInfo
	,pPaintKills[3],pPaintDeaths[3],
if(PaintType[killerid] != 0 && PaintType[playerid] != 0) {
            if(PaintText[PaintType[playerid]-1] > 1) return 1;
            if(PaintTime[PaintType[playerid]-1] < 1) return 1;        
            
            for(new m; m < 2; m++) {
                if(PlayerInfo[killerid][pDailyMission][m] == 0) CheckMission(killerid, m);
            }    
            
            PlayerInfo[killerid][pPaintKills][PaintType[killerid]-1] ++;
            switch(PaintType[killerid]-1) {
                case 0: UpdateVar(killerid, "PaintKills1", PlayerInfo[killerid][pPaintKills][PaintType[killerid]-1]);
                case 1: UpdateVar(killerid, "PaintKills2", PlayerInfo[killerid][pPaintKills][PaintType[killerid]-1]);
                case 2: UpdateVar(killerid, "PaintKills3", PlayerInfo[killerid][pPaintKills][PaintType[killerid]-1]);                
            }    
            
            PlayerInfo[playerid][pPaintDeaths][PaintType[playerid]-1] ++;        
            switch(PaintType[playerid]-1) {
                case 0: UpdateVar(playerid, "PaintDeaths1", PlayerInfo[playerid][pPaintDeaths][PaintType[playerid]-1]);
                case 1: UpdateVar(playerid, "PaintDeaths2", PlayerInfo[playerid][pPaintDeaths][PaintType[playerid]-1]);
                case 2:    UpdateVar(playerid, "PaintDeaths3", PlayerInfo[playerid][pPaintDeaths][PaintType[playerid]-1]);            
            }    
            PKills[killerid] ++;
            PDeaths[playerid] ++;
	        if(PaintType[killerid] == 3 && PaintType[playerid] == 3) {
                if(GetPaintLevel(playerid) == ? {
                    foreach(Player,i) {
                        if(IsPlayerConnected(i) && IsPlayerLogged[i] == 1) {
                            if(PaintType[i] == PaintType[killerid]) {
                                new pp = PaintType[killerid]-1;
                                for(new m = 0; m < 5; m++) SendDeathMessageToPlayer(i, 1001, 1001, 200);
                                format(string, sizeof(string), "* %s a castigat runda deoarece a omorat pe %s cu cutitul.", GetName(killerid), GetName(playerid));
                                SendPaintMessage(PaintType[i]-1, COLOR_YELLOW, string);
                                PaintTime[pp] = 300;
                                PKills[i] = 0, PDeaths[i] = 0;
                                PaintballWinner[pp] = i;
                                PaintballWinnerScore[pp] = 0;
                                SpawnPlayer(i);
                            }
                        }
                    }
                }
                else GiveSkillWeapon(killerid);
            }
            foreach(Player,i) if(PaintType[i] == PaintType[playerid] && PlayerInfo[i][pAdmin] == 0) SendDeathMessageToPlayer(i, killerid, playerid, reason);
            if(PKills[killerid] > PaintballWinnerScore[PaintType[playerid]-1]) {
                PaintballWinner[PaintType[playerid]-1]  = killerid;
                PaintballWinnerScore[PaintType[playerid]-1] = PKills[killerid];
            }
        }
	PlayerInfo[playerid][pPaintKills][0] = cache_get_field_content_int(0, "PaintKills1");
            PlayerInfo[playerid][pPaintKills][1] = cache_get_field_content_int(0, "PaintKills2");
            PlayerInfo[playerid][pPaintKills][2] = cache_get_field_content_int(0, "PaintKills3");
            PlayerInfo[playerid][pPaintDeaths][2] = cache_get_field_content_int(0, "PaintDeaths1");
            PlayerInfo[playerid][pPaintDeaths][2] = cache_get_field_content_int(0, "PaintDeaths2");
            PlayerInfo[playerid][pPaintDeaths][2] = cache_get_field_content_int(0, "PaintDeaths3");
	
Edited by Cordyandrey
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.