Jump to content

Am si eu o mica problema


Kralzzyy

Recommended Posts

Salutare! Imi arata asa in consola:

 

[debug] Run time error 4: "Array index out of bounds"

[debug] Accessing element at index 102 past array upper bound 101

[debug] AMX backtrace: [debug] #0 00389504 in public DecreaseTimer () at nzone.pwn:29261

[warning] client exceeded 'ackslimit' 86.120.224.189:56451 (5812) Limit: 3000/sec

 

Asta e functia de la care apare eroarea:

 

task DecreaseTimer[5000]() {
    new string[256];
    foreach(PersonalVSpawned, idd) if(CarInfo[idd][cTime] < gettime() && CarInfo[idd][cTime] != -1) DestroyPlayerCar(idd); 
    
    foreach(Player, i) {
        if(!IsPlayerConnected(i) && IsPlayerLogged[i] != 1)
            continue;

        new Float: playerArmour; 
        GetPlayerArmour(i, playerArmour);            
        if(playerArmour == 100 && PlayerInfo[i][pAdmin] == 0 && GetPVarInt(i, "Armour") == 0) {
            if(ServerSystem[3] == 0) NightBot(i, "Cheats (armour-hack)");    
        }
        //if(FPS2[i] == 0 && AFKSeconds[i] > 120 && PlayerInfo[i][pSleeping] == 0) NightBot(i, "rakdroid");
        new Float: playerHealth; 
        GetPlayerArmour(i, playerHealth);            
        if(playerHealth == 100 && PlayerInfo[i][pAdmin] == 0) {
            if(ServerSystem[8] == 0) NightBot(i, "Cheats (health-hack)");    
        }            
                    
        if(PlayerInfo[i][pWantedLevel] >= 1 && WantedTime[i] == 10) {
               WantedTime[i] = 0;
            PlayerInfo[i][pWantedLevel] --;
            SetPlayerWantedLevel(i, PlayerInfo[i][pWantedLevel]);
            Update(i, pWantedLevelx);
            if(PlayerInfo[i][pWantedLevel] == 0) {
                SCM(i, COLOR_YELLOW, "Acum nu mai ai wanted deoarece politia ti-a pierdut urma!");
                PlayerTextDrawHide(i, WantedTD[i]);
                ClearCrime(i);
                finishAchievement(i, 15);
            }
            else {
                format(string, sizeof(string), "Politia iti pierde urma! Wanted Actual: %d", PlayerInfo[i][pWantedLevel]);
                SCM(i, COLOR_YELLOW, string);
            }
            format(string, sizeof(string), "%s [%d] lost 1 wanted level. W: %d", GetName(i), i, PlayerInfo[i][pWantedLevel]);
            SendTeamMessage(14, 0x2e64feFF, string);
            SendTeamMessage(3, COLOR_DBLUE, string);
            SendTeamMessage(2, COLOR_DBLUE, string);
            SendTeamMessage(1, COLOR_DBLUE, string);            
        }
        
        if(IsPlayerInRangeOfPoint(i, 30.0, 184.3529,-1825.4983,8.7530)) {    
            if(GetPVarInt(i, "Listening") == 0) {
                PlayAudioStreamForPlayer(i, beachlink, 184.3529,-1825.4983,8.7530, 30.0, 1);
                SetPVarInt(i, "Listening", 1);
            }    
        }
        else {
            if(GetPVarInt(i, "Listening") == 1) SetPVarInt(i, "Listening", 0);
        }
        
        // -- Variables
        for(new t = 0; t < 18; t++) {
            if(DeelayCommand[i][t] != 0) {
                DeelayCommand[i][t] -= 5;    
                if(DeelayCommand[i][t] < 0) DeelayCommand[i][t] = 0;
            }                
        }
        for(new t = 0; t < 13; t++) {
            if(JobDeelay[i][t] != 0) {
                JobDeelay[i][t] -= 5;    
                if(JobDeelay[i][t] < 0) JobDeelay[i][t] = 0;
            }                
        }            

        if(PlayerTime[i][0] != 0) PlayerTime[i][0] -= 5;
        if(PlayerTime[i][0] < 0) PlayerTime[i][0] = 0;
        
        if(PlayerInfo[i][pReportTime] >= 1) {
            PlayerInfo[i][pReportTime] -= 5;    
            if(PlayerInfo[i][pReportTime] < 0) PlayerInfo[i][pReportTime] = 0;
        }
        if(PlayerInfo[i][pNewbieMute] >= 1) {
            PlayerInfo[i][pNewbieMute] -= 5;
            if(PlayerInfo[i][pNewbieMute] < 0) PlayerInfo[i][pNewbieMute] = 0;
        }
        if(FreezeTime[i] != 0) {
            FreezeTime[i] -= 5;
            if(FreezeTime[i] < 0) FreezeTime[i] = 0;
            if(FreezeTime[i] == 0) {
                SCM(i, COLOR_LIGHTBLUE, "Acum nu mai ai freeze!");
                TogglePlayerControllable(i, 1);
            }
        }                        

        if(PlayerToPoint(50, i, -2317.8091,-1637.5575,483.7031)) {
            for(new m; m < 2; m++) {
                if(PlayerInfo[i][pDailyMission][m] == 7) CheckMission(i, m);
            }        
        }
        if(PlayerToPoint(50, i, 1962.4126,-2193.3279,13.5469)) {
            for(new m; m < 2; m++) {
                if(PlayerInfo[i][pDailyMission][m] == 8) CheckMission(i, m);
            }        
        }
        if(PlayerToPoint(100, i, 1338.6273,2153.1045,11.0578)) {
            for(new m; m < 2; m++) {
                if(PlayerInfo[i][pDailyMission][m] == 9) CheckMission(i, m);
            }        
        }        
    }    
    return true;
}

Ma poate ajuta cineva, va rog frumos?

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
Reply to this topic...

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