Васёк123
Умник
Крч в игре как умираешь то в логах вот что.
Выставлю целый паблик и строку выделю ==== =======.
Вот может у кого то было такое? Что там не так. Help me plz!
[01:03:03] [debug] Run time error 4: "Array index out of bounds"
[01:03:03] [debug] Accessing element at index 65535 past array upper bound 149
[01:03:03] [debug] AMX backtrace:
[01:03:03] [debug] #0 001df820 in public OnPlayerDeath (playerid=0, killerid=65535, reason=255) at C:\Users\Василий\Desktop\Titan Tech\gamemodes\new.pwn:9050
[01:03:03] [death] Vasya_Ganchich died 255
[01:03:03] [debug] Accessing element at index 65535 past array upper bound 149
[01:03:03] [debug] AMX backtrace:
[01:03:03] [debug] #0 001df820 in public OnPlayerDeath (playerid=0, killerid=65535, reason=255) at C:\Users\Василий\Desktop\Titan Tech\gamemodes\new.pwn:9050
[01:03:03] [death] Vasya_Ganchich died 255
PHP:
CALLBACK: OnPlayerDeath(playerid, killerid, reason)
{
new name[MAX_PLAYER_NAME];
new string[256];
new Float:px,Float:py,Float:pz;
usemats[playerid] = 0;
//==============================================================================
new strings[128],pname[24],kname[24];
if(killerid==INVALID_PLAYER_ID)
{
GetPlayerName(playerid,pname,sizeof(pname));
format(strings,sizeof(strings),"",pname,playerid);
SendClientMessage(playerid,0xAA3333AA,strings);
}
else
{
new stringa[128];
GetPlayerName(playerid,pname,sizeof(pname));
GetPlayerName(killerid,kname,sizeof(kname));
format(stringa,sizeof(stringa),"[ИНФО]: %s [ID:%i] убил игрока %s [ID:%d]!",kname,killerid,pname,playerid);
ABroadCast(0xAA3333AA,stringa,1);
}
//==============================================================================
SetPVarInt(playerid, "PlayerInAFK", -2);
GetPlayerName(playerid, name, sizeof(name));
GetPlayerPos(playerid, px, py, pz);
====if(PlayerInfo[killerid][pJailed] == 0) ===========(Строка 9050)
{
if(IsACop(killerid)) { return 1; }
if(PlayerInfo[killerid][pWanted] == 6) { return 1; }
else
{
PlayerInfo[killerid][pWanted] += 1;
SendClientMessage(killerid,COLOR_YELLOW,"Вы получили 1 уровень розыска. Причина: Убийство.");
SetPlayerWantedLevel(killerid,PlayerInfo[killerid][pWanted]);
}
}
if(gPlayerUsingLoopingAnim[playerid])
{
gPlayerUsingLoopingAnim[playerid] = 0;
}
if(reason == 38)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, "Античит: [%d]%s Этот игрок стреляет с минигана, забаньте его!!!.",killerid,kickname);
ABroadCast(COLOR_YELLOW,string,1);
printf("%s", kstring);
}
}
if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
{
DisablePlayerCheckpoint(playerid);
gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
}
new caller = Mobile[playerid];
if(caller != 255)
{
if(caller < 255)
{
SendClientMessage(caller, COLOR_GRAD2, "Абонент бросил трубку");
CellTime[caller] = 0;
CellTime[playerid] = 0;
Mobile[caller] = 255;
}
Mobile[playerid] = 255;
CellTime[playerid] = 0;
return true;
}
return true;
}
Последнее редактирование модератором:
