[Ajuda] Ataques?
#1

Recentemente meu servidor tem crashado com bastante frequкncia, no log nгo havia nada, usei o crashdetect e ele mostrou isto:

Код:
[21:59:26] [debug] AMX backtrace:
[21:59:26] [debug] #0 00149970 in public OnPlayerTakeDamage (0x00000015, 0x0000ffff, 0x40533334, 0x00000036, 0x00000003) from Vayne.amx
[21:59:27] [chat] [__Wesley__]: koe
[21:59:28] [debug] Run time error 4: "Array index out of bounds"
[21:59:28] [debug]  Accessing element at index 65535 past array upper bound 99
[21:59:28] [debug] AMX backtrace:
[21:59:28] [debug] #0 00149970 in public OnPlayerTakeDamage (0x00000015, 0x0000ffff, 0x40533334, 0x00000036, 0x00000003) from Vayne.amx
Em grande quantidade num mesmo segundo, em torno de 30 ou 40.
Alguйm pode me ajudar por favor?
Reply
#2

Poste todo o cуdigo localizado na callback OnPlayerTakeDamage. Aparentemente, vocк tentou usar um нndice inexistente em uma array.
Reply
#3

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    SetPVarInt(playerid, "ultimoShoot", issuerid);
    if(TaNoX1[issuerid] == 1) PlayerPlaySound(issuerid,17802,0.0,0.0,0.0);
    if(nogame[issuerid] == 1) return 1;
    if(bodypart == 9 && weaponid == 34)
      {
        new aname[MAX_PLAYER_NAME],str[128];
        GetPlayerName(issuerid, aname, MAX_PLAYER_NAME);
        format(str, sizeof(str), "/Contas/%s.ini", aname);
        if(dini_Int(str, "Profissao") == 71)
        {
            SetPlayerHealth(playerid, 0);
            new string[128];
            format(string,sizeof(string),"[INFO]{FFFFFF} %s te matou a sangue frio.",aname);
            SendClientMessage(playerid,Amarelo,string);
            SendClientMessage(issuerid,Amarelo,"[INFO]{FFFFFF} Belo tiro! ;)");
        }
    }
    if(weaponid == 23 && PossuiTazer[issuerid] == 1)
    {
        ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
        SendClientMessage(playerid, roxo,"[INFO]{FFFFFF} Vocк foi atingido por uma tazer e ficou нmovel.");
        PlayAudioStreamForPlayer(playerid,"https://dl.dropboxusercontent.com/u/81829318/MISC/Taser.mp3");
        SetTimerEx("PararTazer",  4000, 0, "d", playerid);
    }
    return 1;
}

p.S: Faz um bom tempo que estб rodando esse gamemode, e nunca houve problemas, acho que a ъltima vez que ele foi editado foi a 2 meses atrбs, dar problema sу agora que foi inusitado.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)