[Ajuda] chatlog e debug
#9

PHP код:
public OnPlayerDeath(playerid,killerid,reason)
{
     
SendDeathMessage(killerid,playerid,reason);
     new  
PlayerSkin=GetPlayerSkin(playerid);
    new  
Float:AngleFloat:xFloat:yFloat:z;
    
       
SpecDelay[playerid]=2;
       
    if(
PlayerInfo[playerid][PlayerStatus]==Aad)
    {
        if(
PlayerInfo[playerid][PlayerTeam]!=TeamC)
        {
               
PlayerInRound[playerid]=false;
               
PlayerInfo[playerid][PlayerDeaths]++,dini_IntSet(PlayerInfo[playerid][PlayerFile],"Deaths",PlayerInfo[playerid][PlayerDeaths]),PlayerRoundInfo[PlayerInfo[playerid][PlayerTeam]][PlayerInfo[playerid][Slot]][Deaths]++;
              if(
killerid!=InvalidId)PlayerRoundInfo[PlayerInfo[killerid][PlayerTeam]][PlayerInfo[killerid][Slot]][Kills]++,PlayerInfo[killerid][PlayerRoundKills]++,TopKillerCount(killerid),PlayerInfo[killerid][PlayerKills]++,dini_IntSet(PlayerInfo[killerid][PlayerFile],"Kills",PlayerInfo[killerid][PlayerKills]);
              if(
PlayerInfo[playerid][PlayerTeam]==TeamA)             TeamInfo[TeamB][Score]++;
              else if(
PlayerInfo[playerid][PlayerTeam]==TeamB)     TeamInfo[TeamA][Score]++;
            
PlayerInfo[playerid][PlayerStatus]=Waiting,
             
SetSpawnInfo(playerid,0,PlayerSkin,MainSpawn[0]+RandomPOS[random(13)][0],MainSpawn[1]+RandomPOS[random(13)][0],MainSpawn[2],MainSpawn[3],0,0,0,0,0,0);
        }
        else 
SetSpawnInfo(playerid,0,PlayerSkin,x,y,z,Angle,0,0,0,0,0,0);
    }
      else if(
PlayerInfo[playerid][PlayerStatus]==Tw)
    {
        if(
PlayerInfo[playerid][PlayerTeam]!=TeamC)
        {
               
PlayerInRound[playerid]=false;
               
PlayerInfo[playerid][PlayerDeaths]++,dini_IntSet(PlayerInfo[playerid][PlayerFile],"Deaths",PlayerInfo[playerid][PlayerDeaths]),PlayerRoundInfo[PlayerInfo[playerid][PlayerTeam]][PlayerInfo[playerid][Slot]][Deaths]++;
              if(
killerid!=InvalidId)PlayerRoundInfo[PlayerInfo[killerid][PlayerTeam]][PlayerInfo[killerid][Slot]][Kills]++,PlayerInfo[killerid][PlayerRoundKills]++,TopKillerCount(killerid),PlayerInfo[killerid][PlayerKills]++,dini_IntSet(PlayerInfo[killerid][PlayerFile],"Kills",PlayerInfo[killerid][PlayerKills]);
              if(
PlayerInfo[playerid][PlayerTeam]==TeamA)             TeamInfo[TeamB][Score]++;
              else if(
PlayerInfo[playerid][PlayerTeam]==TeamB)     TeamInfo[TeamA][Score]++;
            
PlayerInfo[playerid][PlayerStatus]=Waiting,
             
SetSpawnInfo(playerid,0,PlayerSkin,MainSpawn[0]+RandomPOS[random(13)][0],MainSpawn[1]+RandomPOS[random(13)][0],MainSpawn[2],MainSpawn[3],0,0,0,0,0,0);
        }
        else 
SetSpawnInfo(playerid,0,PlayerSkin,x,y,z,Angle,0,0,0,0,0,0);
    }
    else if(
PlayerInfo[playerid][PlayerStatus]==Tdm)
    {
        if(
PlayerInfo[playerid][PlayerTeam]!=TeamC)
        {
            
PlayerInfo[playerid][PlayerDeaths]++,dini_IntSet(PlayerInfo[playerid][PlayerFile],"Deaths",PlayerInfo[playerid][PlayerDeaths]),PlayerRoundInfo[PlayerInfo[playerid][PlayerTeam]][PlayerInfo[playerid][Slot]][Deaths]++;
              if(
killerid!=InvalidId)PlayerRoundInfo[PlayerInfo[killerid][PlayerTeam]][PlayerInfo[killerid][Slot]][Kills]++,PlayerInfo[killerid][PlayerRoundKills]++,TopKillerCount(killerid),PlayerInfo[killerid][PlayerKills]++,dini_IntSet(PlayerInfo[killerid][PlayerFile],"Kills",PlayerInfo[killerid][PlayerKills]);
                if(
PlayerInfo[playerid][PlayerTeam]==TeamA)            TeamInfo[TeamB][Score]++,SetSpawnInfo(playerid,0,TeamInfo[TeamA][Skin],ArenaCoord[0]+RandomPOS[random(13)][0],ArenaCoord[1]+RandomPOS[random(13)][0],ArenaCoord[2],ArenaCoord[3],0,0,0,0,0,0);
            else if(
PlayerInfo[playerid][PlayerTeam]==TeamB)   TeamInfo[TeamA][Score]++,SetSpawnInfo(playerid,0,TeamInfo[TeamB][Skin],ArenaCoord[4]+RandomPOS[random(13)][0],ArenaCoord[5]+RandomPOS[random(13)][0],ArenaCoord[6],ArenaCoord[7],0,0,0,0,0,0);
        }
        else 
SetSpawnInfo(playerid,0,PlayerSkin,x,y,z,Angle,0,0,0,0,0,0);
    }
    else if(
PlayerInfo[playerid][PlayerStatus]==Waiting)
    {
         
SetSpawnInfo(playerid,0,PlayerSkin,MainSpawn[0]+RandomPOS[random(13)][0],MainSpawn[1]+RandomPOS[random(13)][0],MainSpawn[2],MainSpawn[3],0,0,0,0,0,0);
    }
    else if(
PlayerInfo[playerid][PlayerStatus]==Sub)
    {
        if(
PlayerInfo[playerid][Duel]>0)
        {
            new 
DuelStr[256];
            new 
duelid=PlayerInfo[playerid][Duel];
            if(
killerid != InvalidId)
            {
                 new 
Hp,Float:H,Float:A;
                 
GetPlayerHealth(killerid,H),GetPlayerArmour(killerid,A);
                 
Hp=floatround(H,floatround_round)+floatround(A,floatround_round);
                  
format(DuelStr,MaxString,"(DUEL): \"%s\" Derrotou \"%s\" no /Duel %d (Hp Restante: %d).",PlayerInfo[killerid][PlayerName],PlayerInfo[playerid][PlayerName],duelid,Hp);
                 
PlayerInfo[killerid][PlayerDuelKills]++;
                    
dini_IntSet(PlayerInfo[killerid][PlayerFile],"DuelKills",PlayerInfo[killerid][PlayerDuelKills]);
                 
PlayerInfo[playerid][PlayerDuelDeaths]++;
                 
dini_IntSet(PlayerInfo[playerid][PlayerFile],"DuelDeaths",PlayerInfo[playerid][PlayerDuelDeaths]);
            }
            else
            {
                 
format(DuelStr,MaxString,"(DUEL): \"%s\" Suicidou-se no /Duel %d.",PlayerInfo[playerid][PlayerName],duelid);
            }
            
SetSpawnInfo(playerid,0,GetPlayerSkin(playerid),MainSpawn[0]+RandomPOS[random(13)][0],MainSpawn[1]+RandomPOS[random(13)][0],MainSpawn[2],MainSpawn[3],0,0,0,0,0,0);
            
DuelInfos[duelid][Status]=Ending;
            
PlayerInfo[playerid][Duel]=0;
               
SendClientMessageToAll(ServerColor2,DuelStr);
          }
         
SetSpawnInfo(playerid,0,PlayerSkin,MainSpawn[0]+RandomPOS[random(13)][0],MainSpawn[1]+RandomPOS[random(13)][0],MainSpawn[2],MainSpawn[3],0,0,0,0,0,0);
    }
       return 
1;

Reply


Messages In This Thread
chatlog e debug - by Lukinhas_Ice - 16.04.2013, 22:00
Re: chatlog e debug - by DevilAgain - 16.04.2013, 22:12
Re: chatlog e debug - by Lukinhas_Ice - 16.04.2013, 22:21
Re: chatlog e debug - by DevilAgain - 16.04.2013, 22:24
Re: chatlog e debug - by Lukinhas_Ice - 16.04.2013, 22:38
Re: chatlog e debug - by DevilAgain - 17.04.2013, 14:49
Re: chatlog e debug - by zSuYaNw - 17.04.2013, 14:53
Re: chatlog e debug - by seven7een - 17.04.2013, 14:54
Re: chatlog e debug - by Lukinhas_Ice - 17.04.2013, 16:39

Forum Jump:


Users browsing this thread: 2 Guest(s)