#1

Из-за чего все так?
Quote:

[17:39:58] [debug] Run time error 4: "Array index out of bounds"
[17:39:58] [debug] Accessing element at index 682 past array upper bound 681
[17:39:58] [debug] AMX backtrace:
[17:39:58] [debug] #0 0000ba1c in ?? () from GameMode.amx
[17:39:58] [debug] #1 0001b394 in public aat_OnPlayerSpawn () from GameMode.amx
[17:39:58] [debug] #2 0000f47c in public OnPlayerSpawn () from GameMode.amx

PHP код:
public OnPlayerSpawn(playerid)
{
    if(
PlayerLogged[playerid] == 0) return GKick(playerid);
    
SetPlayerVirtualWorld(playerid,0);
    
PlayerPlaySound(playerid,1184,0.0,0.0,0.0);
    
SetPVarInt(playerid,"K_Times",0);
    
SetPVarInt(playerid"AntiBreik"3);
    
SetPlayerSkills(playerid);
    
SetHealth(playerid,100.00);
    
sitosti CreateProgressBar(548.0035.0057.506.193407871100.0);
    
SetProgressBarValue(sitostiPlayerInfo[playerid][pSatiety]);
    if(
animload[playerid] == false)
    {
        
PreloadAnimLib(playerid,"BOMBER");
        
PreloadAnimLib(playerid,"BD_FIRE");
        
PreloadAnimLib(playerid,"RAPPING");
        
PreloadAnimLib(playerid,"SHOP");
        
PreloadAnimLib(playerid,"BEACH");
        
PreloadAnimLib(playerid,"SMOKING");
        
PreloadAnimLib(playerid,"FOOD");
        
PreloadAnimLib(playerid,"ON_LOOKERS");
        
PreloadAnimLib(playerid,"DEALER");
        
PreloadAnimLib(playerid,"CRACK");
        
PreloadAnimLib(playerid,"CARRY");
        
PreloadAnimLib(playerid,"CASINO");
        
PreloadAnimLib(playerid,"COP_AMBIENT");
        
PreloadAnimLib(playerid,"PARK");
        
PreloadAnimLib(playerid,"INT_HOUSE");
        
PreloadAnimLib(playerid,"FOOD");
        
PreloadAnimLib(playerid,"CRIB");
           
PreloadAnimLib(playerid,"ROB_BANK");
           
PreloadAnimLib(playerid,"JST_BUISNESS");
        
PreloadAnimLib(playerid,"PED");
        
PreloadAnimLib(playerid,"OTB");
        
PreloadAnimLib(playerid,"BUDDY");
        
animload[playerid] = true;
    }
    if(
PlayerInfo[playerid][pFightStyle] != 0)
    {
        
SetPlayerFightingStyle(playerid,PlayerInfo[playerid][pFightStyle]);
    }
    else 
SetPlayerFightingStyle(playerid,0);
    
GunCheckTime[playerid] = 5;
    
SetMoney(playeridPlayerInfo[playerid][pCash]);
    
SetPlayerTeamColor(playerid);
    
ResetWeapon(playerid);
    
LoadPWeapon(playerid);
    
SetPlayerScore(playeridPlayerInfo[playerid][pLevel]);
    if(
PlayerInfo[playerid][pWanted] > 0SetPlayerWantedLevel(playeridPlayerInfo[playerid][pWanted]);
    if(
PlayerLogged[playerid] == 0SendClientMessage(playeridCOLOR_LIGHTREDPlayerNeedToLoggedForToPlay), GKick(playerid);
    if(
PlayerInfo[playerid][pChar] > 0SetPlayerSkin(playerid,PlayerInfo[playerid][pChar]);
    else 
SetPlayerSkin(playeridPlayerInfo[playerid][pModel]);
    if(
ClothesRound[playerid] == 1)
    {
        
SendClientMessage(playeridCOLOR_YELLOW"×òî áû ïðîñìàòðèâàòü îäåæäó, èñïîëüçóéòå ñòðåëî÷êè íà ýêðàíå!");
        
SetPlayerVirtualWorld(playeridplayerid);
        
SetPlayerInterior(playerid,14);
        
SetPlayerPos(playerid,208.4520,-160.8391,1000.5234);
        
SetPlayerFacingAngle(playerid,180.9319);
        
SetPlayerCameraPos(playerid207.6285, -166.36271003.5407);
        
SetPlayerCameraLookAt(playerid207.6098, -165.36431003.1712);
        
ApplyAnimation(playerid,"DEALER"," DEALER_IDLE ",4.1,1,1,1,1,1);
        
TogglePlayerControllable(playerid0);
        
TextDrawShowForPlayer(playerid,ButtonLeft);
        
TextDrawShowForPlayer(playerid,ButtonRight);
        
TextDrawShowForPlayer(playerid,ButtonSelect);
        
SelectTextDraw(playerid0x2641FEAA);
        
SetHealth(playerid,100.00);
        if(
PlayerInfo[playerid][pSex] == 1SetPlayerSkin(playeridJoinReg[0][0]), SelectCharRegID[playerid] = 1ChosenSkin[playerid] = JoinReg[0][0];
        else 
SetPlayerSkin(playeridJoinReg[5][0]), SelectCharRegID[playerid] = 1ChosenSkin[playerid] = JoinReg[5][0];
    }
    else if(
ClothesRound[playerid] == 2)
    {
        
SendClientMessage(playeridCOLOR_YELLOW"×òîáû ïðîñìàòðèâàòü îäåæäó, èñïîëüçóéòå ñòðåëî÷êó =>, äëÿ âûáîðà íàæìèòå 'SELECT'");
        
SetPlayerVirtualWorld(playeridplayerid);
        
SetPlayerInterior(playerid,14);
        
SetPlayerPos(playerid,208.4520,-160.8391,1000.5234);
        
SetPlayerFacingAngle(playerid,180.9319);
        
SetPlayerCameraPos(playerid207.6285, -166.36271003.5407);
        
SetPlayerCameraLookAt(playerid207.6098, -165.36431003.1712);
        
ApplyAnimation(playerid,"DEALER"," DEALER_IDLE ",4.1,1,1,1,1,1);
        
TogglePlayerControllable(playerid0);
        
SelectTextDraw(playerid0x2641FEAA);
        
TextDrawShowForPlayer(playerid,ButtonRight);
        
TextDrawShowForPlayer(playerid,ButtonSelect);
        if(
SelectCharID[playerid] == F_MAYORSetPlayerSkin(playeridJoinPed[0][0]),SelectCharPlace[playerid] = 1ChosenSkin[playerid] = JoinPed[0][0];
        if(
SelectCharID[playerid] == F_POLICE_LS || SelectCharID[playerid] == F_POLICE_SF || SelectCharID[playerid] == F_POLICE_LVSetPlayerSkin(playeridJoinPed[6][0]),SelectCharPlace[playerid] = 1ChosenSkin[playerid] = JoinPed[6][0];
        if(
SelectCharID[playerid] == F_FBI || SelectCharID[playerid] == F_CIASetPlayerSkin(playeridJoinPed[14][0]),SelectCharPlace[playerid] = 1ChosenSkin[playerid] = JoinPed[14][0];
        if(
SelectCharID[playerid] == F_HOSPITALSetPlayerSkin(playeridJoinPed[19][0]),SelectCharPlace[playerid] = 1ChosenSkin[playerid] = JoinPed[19][0];
        if(
SelectCharID[playerid] == F_LICSetPlayerSkin(playeridJoinPed[25][0]),SelectCharPlace[playerid] = 1ChosenSkin[playerid] = JoinPed[25][0];
        if(
SelectCharID[playerid] == F_GROVESetPlayerSkin(playeridJoinPed[36][0]),SelectCharPlace[playerid] = 1ChosenSkin[playerid] = JoinPed[36][0];
        if(
SelectCharID[playerid] == F_BALLASSetPlayerSkin(playeridJoinPed[32][0]),SelectCharPlace[playerid] = 1ChosenSkin[playerid] = JoinPed[32][0];
        if(
SelectCharID[playerid] == F_AZTECASSetPlayerSkin(playeridJoinPed[43][0]),SelectCharPlace[playerid] = 1ChosenSkin[playerid] = JoinPed[43][0];
        if(
SelectCharID[playerid] == F_VAGOSSetPlayerSkin(playeridJoinPed[47][0]),SelectCharPlace[playerid] = 1ChosenSkin[playerid] = JoinPed[47][0];
        if(
SelectCharID[playerid] == F_RIFASetPlayerSkin(playeridJoinPed[51][0]),SelectCharPlace[playerid] = 1ChosenSkin[playerid] = JoinPed[51][0];
        if(
SelectCharID[playerid] == F_ARMYSetPlayerSkin(playeridJoinPed[30][0]),SelectCharPlace[playerid] = 1ChosenSkin[playerid] = JoinPed[30][0];
        if(
SelectCharID[playerid] == F_YAKUZASetPlayerSkin(playeridJoinPed[58][0]),SelectCharPlace[playerid] = 1ChosenSkin[playerid] = JoinPed[58][0];
        if(
SelectCharID[playerid] == F_RMSetPlayerSkin(playeridJoinPed[65][0]),SelectCharPlace[playerid] = 1ChosenSkin[playerid] = JoinPed[65][0];
        if(
SelectCharID[playerid] == F_LCNSetPlayerSkin(playeridJoinPed[71][0]),SelectCharPlace[playerid] = 1ChosenSkin[playerid] = JoinPed[71][0];
        if(
SelectCharID[playerid] == F_NEWSSetPlayerSkin(playeridJoinPed[75][0]),SelectCharPlace[playerid] = 1ChosenSkin[playerid] = JoinPed[75][0];
    }
    else if(
ClothesRound[playerid] == 3)
    {
        new 
string[128];
        
SendClientMessage(playeridCOLOR_YELLOW"Âûáåðèòå ñåáå ïîäõîäÿùóþ îäåæäó, ïîñëå âûáîðà íàæìèòå 'SELECT', äëÿ îòìåíû íàæìèòå 'CANCEL'");
        
SendClientMessage(playeridCOLOR_LIGHTRED"×òîáû ïðîñìîòðåòü îäåæäó, èñïîëüçóéòå ñòðåëî÷êè <= èëè =>");
        
SetPlayerVirtualWorld(playeridplayerid);
        
SetPlayerInterior(playerid,14);
        
SetPlayerPos(playerid,208.4520,-160.8391,1000.5234);
        
SetPlayerFacingAngle(playerid,180.9319);
        
SetPlayerCameraPos(playerid207.6285, -166.36271003.5407);
        
SetPlayerCameraLookAt(playerid207.6098, -165.36431003.1712);
        
ApplyAnimation(playerid,"DEALER"," DEALER_IDLE ",4.1,1,1,1,1,1);
        
TogglePlayerControllable(playerid0);
        
TextDrawShowForPlayer(playerid,ButtonRight);
        
TextDrawShowForPlayer(playerid,ButtonSelect);
        
TextDrawShowForPlayer(playerid,ButtonCancel);
        
TextDrawShowForPlayer(playerid,ButtonLeft);
        
SelectTextDraw(playerid0x2641FEAA);
        
//PlayerSpawned[playerid] = 1;
        
if(PlayerInfo[playerid][pSex] == 1)
        {
            
SelectCharPlace[playerid] = 0;
            
SetPlayerSkin(playeridJoinShopM[SelectCharPlace[playerid]][0]);
            
format(string128"~b~~n~~n~~n~~n~~n~~n~PRICE: ~w~%i",JoinShopM[SelectCharPlace[playerid]][1]);
        }
        else
        {
            
SelectCharPlace[playerid] = 0;
            
SetPlayerSkin(playeridJoinShopF[SelectCharPlace[playerid]][0]);
            
format(string128"~b~~n~~n~~n~~n~~n~~n~PRICE: ~w~%i",JoinShopF[SelectCharPlace[playerid]][1]);
        }
        
GameTextForPlayer(playeridstring20003);
    }
    else
    {
        if(
PlayerInfo[playerid][pJail] == 1)
        {
            
SetPlayerInterior(playerid6);
            
SetPlayerPos(playerid,264.1425,77.4712,1001.0391);
            
SetPlayerFacingAngle(playerid263.0160);
            new 
string[128];
            
format(string80"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%s"PlayerInfo[playerid][pJailTime]-10);
            
GameTextForPlayer(playeridstring10003);
            
SendClientMessage(playeridCOLOR_LIGHTRED"Âû åùå íå îòñèäåëè ñâîé òþðåìíûé ñðîê");
            
PlayerSpawned[playerid] = 1;
            return 
true;
        }
        if(
PlayerInfo[playerid][pJail] == 2)
        {
            
SetPlayerInterior(playerid10);
            
SetPlayerPos(playerid,219.5400,109.9767,999.0156);
            
SetPlayerFacingAngle(playerid1.0000);
            new 
string[128];
            
format(string80"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%s"PlayerInfo[playerid][pJailTime]-10);
            
GameTextForPlayer(playeridstring10003);
            
SendClientMessage(playeridCOLOR_LIGHTRED"Âû åùå íå îòñèäåëè ñâîé òþðåìíûé ñðîê");
            
PlayerSpawned[playerid] = 1;
            return 
true;
        }
        if(
PlayerInfo[playerid][pJail] == 3)
        {
            
SetPlayerInterior(playerid0);
            
SetPlayerPos(playerid,285.7703,286.7446,996.5789);
            
SetPlayerFacingAngle(playerid0.0000);
            new 
string[128];
            
format(string80"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%s"PlayerInfo[playerid][pJailTime]-10);
            
GameTextForPlayer(playeridstring10003);
            
SendClientMessage(playeridCOLOR_LIGHTRED"Âû åùå íå îòñèäåëè ñâîé òþðåìíûé ñðîê");
            
PlayerSpawned[playerid] = 1;
            return 
true;
        }
        if(
PlayerInfo[playerid][pJail] == 4)
        {
            
SetPlayerInterior(playerid3);
            
SetPlayerPos(playerid,193.4487,175.4382,1003.0234);
            
SetPlayerFacingAngle(playerid0.0000);
            new 
string[128];
            
format(string80"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~JAILED: ~w~%s"PlayerInfo[playerid][pJailTime]-10);
            
GameTextForPlayer(playeridstring10003);
            
SendClientMessage(playeridCOLOR_LIGHTRED"Âû åùå íå îòñèäåëè ñâîé òþðåìíûé ñðîê");
            return 
true;
        }
        else if(
PlayerInfo[playerid][pHospital] == 1)
        {
            
TogglePlayerControllable(playerid,false);
            
SetTimerEx("PlayerToggle"1600false"d"playerid);
            
SetHealth(playerid15.0);
            
SetPlayerFacingAngle(playerid90);
            
SetPlayerInterior(playerid0);
            
SetPlayerVirtualWorld(playerid,0);
            
SetPlayerPos(playerid,1178.7709,-1378.5133,13.8859);
            
PlayerSpawned[playerid] = 1;
            return 
true;
        }
        for(new 
1<= TOTALHOUSE;i++)
        {
            if(!
strcmp(HouseInfo[i][hOwner],PlayerInfo[playerid][pSendername],true))
            {
                if(
PlayerInfo[playerid][pSpawnChange] != 0)
                {
                    
SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
                    
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
                    
SetPlayerVirtualWorld(playerid,HouseInfo[i][hVirtual]);
                    
SetPVarInt(playerid"PlayerHouse"i);
                    
PlayerSpawned[playerid] = 1;
                    return 
true;
                }
            }
        }
        
//=========================== Spawns Ôðàêöèé ===========================
        
if(PlayerInfo[playerid][pMember] == 0// Spawns ïðèåçæèõ
        
{
            if(
PlayerInfo[playerid][pLevel] >= && PlayerInfo[playerid][pLevel] <= 10000)
            {
                
TogglePlayerControllable(playerid,false);
                
SetPlayerPos(playerid,1154.3702,-1768.4338,16.5938);
                
SetPlayerFacingAngle(playerid359.7278);
                
SetPlayerInterior(playerid,0);
                
SetPlayerVirtualWorld(playerid0);
                
SetTimerEx("PlayerToggle"1000false"d"playerid);
                
//return true;
            
}
        }
        if(
PlayerInfo[playerid][pMember] == F_MAYOR)
        {
            
SetPlayerPos(playerid,337.1920,193.5128,1014.1797);
            
SetPlayerFacingAngle(playerid265.8);
            
SetPlayerInterior(playerid,3);
            
SetPlayerVirtualWorld(playerid1);
            
//return true;
        
}
        if(
PlayerInfo[playerid][pMember] == F_POLICE_LS)
        {
            
SetPlayerPos(playerid,234.1521,71.5594,1005.0391);
            
SetPlayerFacingAngle(playerid358.0);
            
SetPlayerInterior(playerid6);
            
SetPlayerVirtualWorld(playerid0);
            
//return true;
        
}
        if(
PlayerInfo[playerid][pMember] == F_POLICE_SF)
        {
            
SetPlayerPos(playerid,225.1647,121.0442,999.0786);
            
SetPlayerFacingAngle(playerid89.0);
            
SetPlayerInterior(playerid10);
            
SetPlayerVirtualWorld(playerid0);
            
//return true;
        
}
        if(
PlayerInfo[playerid][pMember] == F_FBI)
        {
            
SetPlayerPos(playerid,323.5093,286.0427,1007.3959);
            
SetPlayerFacingAngle(playerid359.3);
            
SetPlayerInterior(playerid0);
            
SetPlayerVirtualWorld(playerid0);
            
//return true;
        
}
        if(
PlayerInfo[playerid][pMember] == F_HOSPITAL)
        {
            
SetPlayerPos(playerid,1178.8590,-1347.5291,13.8859);
            
SetPlayerFacingAngle(playerid67.5002);
            
SetPlayerInterior(playerid0);
            
SetPlayerVirtualWorld(playerid0);
            
//return true;
        
}
        if(
PlayerInfo[playerid][pMember] == F_LIC)
        {
            
SetPlayerPos(playerid,-2032.8049,-117.4445,1035.1719);
            
SetPlayerFacingAngle(playerid269.9);
            
SetPlayerInterior(playerid3);
            
SetPlayerVirtualWorld(playerid1);
            
//return true;
        
}
        else if(
PlayerInfo[playerid][pMember] == F_GROVE && GetPVarInt(playerid,"Hospital") == 0)
        {
            
t_SetPlayerPos(playerid,2483.2910,-1637.9647,14.3169);
            
SetPlayerFacingAngle(playerid225.2027);
            
SetPlayerInterior(playerid0);
            
SetPlayerVirtualWorld(playerid0);
            
SetPVarInt(playerid,"Hospital",0);
            
//return true;
        
}
        else if(
PlayerInfo[playerid][pMember] == F_BALLAS && GetPVarInt(playerid,"Hospital") == 0)
        {
            
t_SetPlayerPos(playerid,2488.5366,-1987.3193,13.8949);
            
SetPlayerFacingAngle(playerid130.5200);
            
SetPlayerInterior(playerid0);
            
SetPlayerVirtualWorld(playerid0);
            
SetPVarInt(playerid,"Hospital",0);
            
//return true;
        
}
        else if(
PlayerInfo[playerid][pMember] == F_RIFA && GetPVarInt(playerid,"Hospital") == 0)
        {
            
t_SetPlayerPos(playerid,2172.1450,-1780.1101,13.5756);
            
SetPlayerFacingAngle(playerid189.2710);
            
SetPlayerInterior(playerid0);
            
SetPlayerVirtualWorld(playerid0);
            
SetPVarInt(playerid,"Hospital",0);
            
//return true;
        
}
        else if(
PlayerInfo[playerid][pMember] == F_AZTECAS && GetPVarInt(playerid,"Hospital") == 0)
        {
            
t_SetPlayerPos(playerid,1689.3876,-2094.1104,13.9339);
            
SetPlayerFacingAngle(playerid,49.1287);
            
SetPlayerInterior(playerid0);
            
SetPlayerVirtualWorld(playerid0);
            
SetPVarInt(playerid,"Hospital",0);
            
//return true;
        
}
        else if(
PlayerInfo[playerid][pMember] == F_VAGOS && GetPVarInt(playerid,"Hospital") == 0)
        {
            
t_SetPlayerPos(playerid,2799.4390,-1620.4969,14.5990);
            
SetPlayerFacingAngle(playerid301.3435);
            
SetPlayerInterior(playerid0);
            
SetPlayerVirtualWorld(playerid0);
            
SetPVarInt(playerid,"Hospital",0);
            
//return true;
        
}
        if(
PlayerInfo[playerid][pMember] == F_ARMY)
        {
            
SetPlayerPos(playerid,247.8784,1859.4562,14.0840);
            
SetPlayerFacingAngle(playerid90.2);
            
SetPlayerInterior(playerid0);
            
SetPlayerVirtualWorld(playerid0);
        
//    return true;
        
}
        if(
PlayerInfo[playerid][pMember] == F_CIA)
        {
            
SetPlayerPos(playerid,-1936.6405,646.8841,46.5625);
            
SetPlayerFacingAngle(playerid,337.4248);
            
SetPlayerInterior(playerid0);
            
SetPlayerVirtualWorld(playerid0);
            
//return true;
        
}
        if(
PlayerInfo[playerid][pMember] == F_LCN)
        {
            
SetPlayerPos(playerid,2541.0574,-1295.1235,1054.6406);
            
SetPlayerFacingAngle(playerid92.2);
            
SetPlayerInterior(playerid2);
            
SetPlayerVirtualWorld(playerid2);
            
//return true;
        
}
        if(
PlayerInfo[playerid][pMember] == F_YAKUZA)
        {
            
SetPlayerPos(playerid,1265.7104,-793.7453,1084.0078);
            
SetPlayerFacingAngle(playerid,268.5670);
            
SetPlayerInterior(playerid5);
            
SetPlayerVirtualWorld(playerid1);
            
//return true;
        
}
        if(
PlayerInfo[playerid][pMember] == F_RM)
        {
            
SetPlayerPos(playerid,2558.9172,-1296.3939,1060.9844);
            
SetPlayerFacingAngle(playerid272.3);
            
SetPlayerInterior(playerid2);
            
SetPlayerVirtualWorld(playerid1);
            
//return true;
        
}
        if(
PlayerInfo[playerid][pMember] == F_NEWS)
        {
            
SetPlayerPos(playerid,2171.5288,1602.0793,999.9686);
            
SetPlayerFacingAngle(playerid87.7);
            
SetPlayerInterior(playerid1);
            
SetPlayerVirtualWorld(playerid1);
            
//return true;
        
}
        if(
PlayerInfo[playerid][pMember] == F_POLICE_LV)
        {
            
SetPlayerPos(playerid,246.0800,186.8824,1008.1719);
            
SetPlayerFacingAngle(playerid178.7634);
            
SetPlayerInterior(playerid3);
            
SetPlayerVirtualWorld(playerid0);
            
//return true;
        
}
    }
    
PreloadAllAnims(playerid);
    
PlayerSpawned[playerid] = 1;
    return 
true;

Reply
#2

Привет

Перейти в папку Pawno. Создайте новый файл с именем pawn.cfg.

В этом файле поставить только это:
Код:
-d3
Когда вы закончите, скомпилировать скрипт.

Теперь сделайте ошибка повторится. Это скажет вам, что строка кода имеет ошибку.

https://github.com/Zeex/samp-plugin-...ith-debug-info
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)