[Ajuda] Estou sempre morrendo
#1

Boa noite, estou com um enorme problema.
Estou morrendo sempre e nгo estou a conseguir resolver este problemas pois o Debug й no Onplayerdeath e eu nгo modifiquei nada nele.

Agradeзo muito a quem me poder ajudar!

DEBUG
PHP код:
[debug#0 00126948 in ?? (2, 65535, 255) from BPS.amx
[debug#1 00124f00 in public ab_OnPlayerDeath (2, 65535, 255) from BPS.amx
[debug#2 native CallLocalFunction () from samp-server.exe
[debug#3 0000b720 in public OnPlayerDeath (2, 65535, 255) from BPS.amx 
Cуdigo OnPlayerDeath
PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    
totaldemortes[playerid]++;
    if(
totaldemortes[playerid] >  4)
    {
        new 
gstring[128];
        
format(gstringsizeof gstring"ANTI-CHEAT: %s[ID: %d] Foi Kickado por poder estar usando Flood Kill!"NomePlayer(playerid), playerid);
           
ABroadCast(COLOR_LIGHTRED,gstring1);
        
Kick(playerid);
        return 
1;
     }
    
SetTimerEx("DesbugMorte"1000false"i",playerid);
    
ColocarColete[playerid] = 0;
    
Cartola[playerid] = 0;
    if(
GetPVarInt(playerid"inArena"))
    {
         new 
rand;
          
rand random(sizeof(Arenax1Spawns));
        
SetPlayerPos(playeridArenax1Spawns[rand][0], Arenax1Spawns[rand][1], Arenax1Spawns[rand][2]);
          
SetPlayerFacingAngle(playeridArenax1Spawns[rand][3]);
        
SetPlayerInterior(playerid15);
        
SetPlayerVirtualWorld(playerid0);
         
ResetPlayerWeapons(playerid);
        
GivePlayerWeapon(playerid24200);
        
GivePlayerWeapon(playerid31500);
        
SetPlayerHealth(playerid50);
        
SetPlayerArmour(playerid50);
        
SetPVarInt(playerid"inArena"1);
        
ChatKill[playerid] = true;
        
SendClientMessage(playeridCOLOR_GRAD1"{FFFFFF}Bem vindo a Arena X1, caso queira sair, use: /sairarena");
        return 
1;
    }
    if(
GetPVarType(killerid"Tempo") != 0)
    {
        new 
tempo;
          
tempo GetPVarInt(killerid"Tempo"), SetPVarInt(playerid"Tempo"0), DeletePVar(playerid"Tempo"), SetPVarInt(killerid"Tempo"0), DeletePVar(killerid"Tempo");
        new 
_s[128], _n[24];
        
SendClientMessageToAll(COLOR_WHITE"|_________ Aviso da Administraзгo _________|");
        
format(_ssizeof(_s), "%s vence o X1 contra %s com um tempo de %d segundos.", (GetPlayerName(killerid_n24), _n),(GetPlayerName(playerid_s128), _s), gettime() - tempo);
         
SendClientMessageToAll(COLOR_DBLUE_s);
        
ResetPlayerWeapons(killerid);
        
SetPlayerSpawn(killerid);
        
SetPlayerSpawn(playerid);
        return 
1;
      }
    if(
pmorto[playerid])return true;
    
OnPlayerDeathEx(playeridkilleridreason);
    
TextDrawShowForPlayer(playeridtextmorte[0]);
    
TextDrawShowForPlayer(playeridtextmorte[1]);
    
JoinedHay[playerid] = 0;
    
    
UpdatePlayerPanel(playerid);
    return 
1;

Cуdigo OnPlayerDeathEx
PHP код:
stock OnPlayerDeathEx(playeridkilleridreason)
{
    
ColocarColete[playerid] = 0;
    
Cartola[playerid] = 0;
    
PlayerInfo[playerid][pArmour] = 0;
    
SetPlayerArmour(playerid0);
    
UpdatePlayerPanel(playerid);
    
gPlayerMascarause[playerid] = 0RemovePlayerAttachedObject(playerid3);
    
OnDuty[playerid] = 0;
    
Update3DTextLabelText(PolicialCivilLabel[playerid], -1" ");
    if(
IsAPM(playerid))
    {
         
PlayerInfo[playerid][pWeaponDelay][23] = 0;
        
PlayerInfo[playerid][pWeaponDelay][24] = 0;
        
PlayerInfo[playerid][pWeaponDelay][25] = 0;
        
PlayerInfo[playerid][pWeaponDelay][27] = 0;
        
PlayerInfo[playerid][pWeaponDelay][29] = 0;
        
PlayerInfo[playerid][pWeaponDelay][30] = 0;
        
PlayerInfo[playerid][pWeaponDelay][31] = 0;
        
PlayerInfo[playerid][pWeaponDelay][33] = 0;
        
PlayerInfo[playerid][pWeaponDelay][34] = 0;
        
PlayerInfo[playerid][pWeaponDelay][35] = 0;
        
PlayerInfo[playerid][pWeaponDelay][36] = 0;
    }
    if(
GetPVarInt(playerid"inArena")) return 1;
    if(
GetPVarInt(killerid"inArena")) return 1;
    if(
GetPVarInt(playerid,"roped") == 1)
     {
          for(new 
destr2=0;destr2<=ropelength;destr2++)
        {
             
DestroyDynamicObject(r0pes[playerid][destr2]);
           }
        
SetPVarInt(playerid,"roped",0);
        
DisablePlayerCheckpoint(playerid);
     }
    new 
string[256];
    if(
MecanicMission[playerid])
    {
        
EndMission(playerid);
    }
    if(
PlayerPaintballing[playerid] != 0)
    {
        
PlayerPaintballKills[killerid] ++;
        if(
PlayerPaintballKills[killerid] > PaintballWinnerKills)
        {
            
PaintballWinner killerid;
            
PaintballWinnerKills PlayerPaintballKills[killerid];
            foreach(
Playeri)
            {
                if(
PlayerPaintballing[i] != 0)
                {
                    
format(stringsizeof(string), "%s estб em 1є com %d Kills.",PlayerName(killerid),PaintballWinnerKills);
                    
SendClientMessage(iCOLOR_WHITEstring);
                }
            }
        }
        return 
1;
    }
    
    
SBizzInfo[12][sbTill] += 100;
    
ExtortionSBiz(12100);
     new 
GunID GetPlayerWeapon(playerid);
      new 
GunAmmo GetPlayerAmmo(playerid);
       new 
Float:xFloat:yFloat:z;
    if(
GunID && GunAmmo != 0)
       {
        new 
MAX_OBJ+1;
         for(new 
0MAX_OBJa++)
          {
               if(
dGunData[a][ObjPos][0] == 0.0)
             {
                  
a;
                break;
             }
        }
        
RemovePlayerWeapon(playeridGunID);
        
GetPlayerPos(playeridxyz);
        
CreateDroppedGun(GunIDGunAmmoxyz);
    }
/*    new Float:pPosX, Float:pPosY, Float:pPosZ;
    GetPlayerPos(playerid, pPosX, pPosY, pPosZ);
       for(new i_slot = 0, gun, ammo; i_slot != 12; i_slot++)
       {
          GetPlayerWeaponData(playerid, i_slot, gun, ammo);
           if(gun != 0 && ammo != 0)
           {
               if(TempDropArmasBody[playerid] >= 30)
               {
                   CreateDroppedGun(gun, ammo, pPosX+random(3)-random(3), pPosY+random(3)-random(3), pPosZ);
            }
        }
    }*/
    
if(roubando[playerid] >= && Temporoubando[playerid] != 0)
    {
           
Temporoubando[playerid] = gettime();
    }
    if(
invadindo[playerid] >= && Tempoinvadindo[playerid] != 0)
    {
           
Tempoinvadindo[playerid] = gettime();
    }
    if(!
admtrampando[playerid] && !helpertrampando[playerid])
    {
          
PlayerInfo[playerid][pHospital] = true;
           
PlayerInfo[playerid][pTempoHospital] = TempoHospital;
      }
    if(
GuerraMorro[gGuerra])
    {
        
CheckPontosTr(playeridkillerid);
        if(
NaCamera[playerid] > 1)
        {
            
TextDrawHideForPlayer(playeridHidealto2);
            
TextDrawHideForPlayer(playeridHidebaixo2);
            
NaCamera[playerid] = 0;
        }
        
RemovePlayerAttachedObjectEx(playerid,Vaga_Escudo);
        
gPlayerSpawned[playerid] = 0;
        if(
IsPlayerInGuerra(playerid))
        {
            
PlayerInfo[playerid][pHospital] = false;
            
PlayerInfo[playerid][pTempoHospital] = 0;
        }
        else
              
gCheckPontos(playeridkillerid);
        if(
GuerraNavio[nmGuerra])
             
nmCheckPontos(playeridkillerid);
      }
    
PlayerInfo[playerid][pLocal] = 255;
    
GetPlayerName(playeridsendernamesizeof(sendername));
    new 
Float:px,Float:py,Float:pz;
    
GetPlayerPos(playeridpxpypz);
    
spawnado[playerid] = 0;
    if(
PlayerInfo[playerid][pLevel] >= && !IsAMedicos(playerid))
    {
        foreach(
Playeri)
        {
               if(
IsAMedicos(i))
               {
                   
PlayerPlaySound(i10390.00.00.0);
                   
GameTextForPlayer(i"~w~Pessoa ~r~Morta~n~Bonus~g~R$100"50001);
                   
GiveDinheiro(i100);
            }
        }
    }
    if(
Sequestrado[playerid] == 1)
    {
        
format(stringsizeof(string), "[SEQUESTRO] Os sequestradores mataram o refйm %s. Fim do Sequestro!"NomePlayer(playerid));
        
SendClientMessageToAll(COLOR_DBLUEstring);
        
Sequestrado[playerid] = 0;
        
PlayerTied[playerid] = 0;
        
PlayerInfo[playerid][pMuted] = 0;
        
PLO += 100;
        
DepositarOrgGrana(7,100);
    }
    if (
gPlayerTerminal[playerid] != 0)
    {
        
BusrouteEnd(playerid);
    }
    if(
killerid != INVALID_PLAYER_ID)
    {
        if(
reason sizeof(ReasonName))
        
format(stringsizeof string"(( Foi morto por {FFFFFF}%s {33CCFF}com a arma: {FFFFFF}%s ))"NomePlayer(killerid), ReasonName[reason]);
        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
        
format(stringsizeof string"%s foi morto por %s com a arma: [%s]"NomePlayer(playerid), NomePlayer(killerid), ReasonName[reason]);
        
ABroadCast(COLOR_DBLUE,string,1);
        
format(stringsizeof string"(( Matou {FFFFFF}%s {33CCFF}com a arma: {FFFFFF}%s ))"NomePlayer(playerid), ReasonName[reason]);
        
SendClientMessage(killeridCOLOR_LIGHTBLUEstring);
        
PlayerInfo[killerid][pKills] ++;
        
MataMorre(playerid,killerid);
        
CheckPontosTr(playerid,killerid);
    }
    else
    {
        if(
reason sizeof(ReasonName))
        
format(stringsizeof string"Morreu (Motivo: %s)"ReasonName[reason]);
        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
        
format(stringsizeof string"%s morreu (Motivo: %s)"NomePlayer(playerid), ReasonName[reason]);
        
ABroadCast(COLOR_DBLUE,string,1);
    }
    if(
TendoGuerra)
    {
        new 
orgid GetPlayerOrg(playerid);
        new 
orgid2 GetPlayerOrg(killerid);
        if((
orgid==3||orgid==15||orgid==23) && (orgid2==3||orgid2==15||orgid2==23))
        {
            if(
IsPlayerInGuerra(playerid) && IsPlayerInGuerra(killerid) && orgid != orgid2)
             {
                
PSG[orgid2] += 1;
                
GranaGuerra += 825+random(500);
            }
        }
    }
//==================================[SUSPEITO MORTO]=========================//
    
if (gPlayerCheckpointStatus[playerid] > && gPlayerCheckpointStatus[playerid] < 11)
    {
        
DisablePlayerCheckpoint(playerid);
        
gPlayerCheckpointStatus[playerid] = CHECKPOINT_Nenhum;
    }
    new 
caller Mobile[playerid];
    if(
caller != 255)
    {
        if(
caller 255)
        {
            
SendClientMessage(caller,  -1"Morreram do outro lado da linha...");
            
CellTime[caller] = 0;
            
CellTime[playerid] = 0;
            
Mobile[caller] = 255;
        }
        
Mobile[playerid] = 255;
        
CellTime[playerid] = 0;
    }
    
ClearCrime(playerid);
    if(
PlayerInfo[playerid][pHeadValue] > || PlayerInfo[playerid][pHeadValueT] > || PlayerInfo[playerid][pHeadValueM] > 0)
    {
        if(
IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID)
        {
            if(
GetPlayerOrg(killerid) == 8)
            {
                if(
GoChase[killerid] == playerid)
                {
                    new 
Receber = (PlayerInfo[playerid][pHeadValue])/(1);
                    
DepositarGranaOrg(8,Receber);
                    
GiveDinheiro(killeridReceber);
                    
format(string,sizeof string,"<< [Hitman] Acabou de morrer para contrato. >>"),
                    
SendClientMessage(playeridCOLOR_LIGHTREDstring);
                    
format(string,128,"[Hitman] %s cumpriu o contrato em %s e recebeu R$%s para o cofre.",PlayerName(killerid),PlayerName(playerid),ConvertMoney(Receber));
                    
SendFamilyMessage(8COLOR_YELLOWstring);
                    
format(stringsizeof(string), "~w~Contrato ~b~Feito~n~~w~Recebimento:~n~~g~R$%s"ConvertMoney(Receber));
                    
SendFamilyMessageGT(8string);
                    
PlayerInfo[playerid][pHeadValue] = 0;
                    
GotHit[playerid] = 0;
                    
GetChased[playerid] = 999;
                    
GoChase[killerid] = 999;
                    
PlayerInfo[killerid][pContratos]++;
                    
HitmanMatou++;
                    
//SetPlayerSkin(killerid, PlayerInfo[killerid][pSkin]);
                    
SetPlayerToTeamColor(killerid);
                    if(
VendoNick[killerid] == false)
                    {
                         
VendoNick[killerid] = true;
                        
SendClientMessage(killeridCOLOR_GRAD1"(( Agora nгo estбs em modo secreto ))");
                           foreach(
Playeri)
                        {
                            
ShowPlayerNameTagForPlayer(ikilleridtrue);
                        }
                    }
                }
            }
            else if(
GetPlayerOrg(killerid) == 22)
            {
                if(
GoChase[killerid] == playerid)
                {
                    new 
Receber = (PlayerInfo[playerid][pHeadValueT])/(1);
                    
DepositarGranaOrg(22,Receber);
                    
GiveDinheiro(killeridReceber);
                    
format(string,sizeof string,"<< [Triad] Acabou de morrer para contrato. >>"),
                    
SendClientMessage(playeridCOLOR_YELLOWstring);
                    
format(stringsizeof(string), "~w~Contrato ~b~Feito~n~~w~Recebimento:~n~~g~R$%s"ConvertMoney(Receber));
                    
SendFamilyMessageGT(22string);
                    
format(string,128,"[Triad] %s cumpriu o contrato em %s e recebeu $%s para o cofre.",PlayerName(killerid),PlayerName(playerid),ConvertMoney(Receber));
                    
SendFamilyMessage(22COLOR_YELLOWstring);
                    
PlayerInfo[playerid][pHeadValueT] = 0;
                    
GotTri[playerid] = 0;
                    
GetChased[playerid] = 999;
                    
GoChase[killerid] = 999;
                    
PlayerInfo[killerid][pContratos]++;
                    
TriadMatou++;
                    
//SetPlayerSkin(killerid, PlayerInfo[killerid][pSkin]);
                    
SetPlayerToTeamColor(killerid);
                    if(
VendoNick[killerid] == false)
                    {
                         
VendoNick[killerid] = true;
                        
SendClientMessage(killeridCOLOR_GRAD1"(( Agora nгo estбs em modo secreto ))");
                           foreach(
Playeri)
                        {
                                
ShowPlayerNameTagForPlayer(ikilleridtrue);
                        }
                    }
                }
            }
        }
    }
    
killerid INVALID_PLAYER_ID;
    return 
true;

Reply
#2

Pera, oque estб acontecendo mesmo? nгo deu para entender oque estб bugado.
Reply
#3

Quote:
Originally Posted by Lovejoy
Посмотреть сообщение
Pera, oque estб acontecendo mesmo? nгo deu para entender oque estб bugado.
Simplesmente depois de morrer fico morrendo infinitamente mano :/
Reply
#4

Deve ser algo nisso aqui: SetTimerEx("DesbugMorte", 1000, false, "i",playerid);
Reply
#5

Quote:
Originally Posted by ipsLuan
Посмотреть сообщение
Deve ser algo nisso aqui: SetTimerEx("DesbugMorte", 1000, false, "i",playerid);
O desbugmorte й isto aqui mano

PHP код:
BPS::DesbugMorte(playerid)
    return 
totaldemortes[playerid] = 0
serб que devo apagar
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)