Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×
  • 0

Question

Posted

Problema intalnita (descriere): Daca un player are wanted si il omoara cineva intra in inchisoare , chiar daca cel care la omorat nu este membru pd fbi ng si nu stiu cum sa reZolv
Ero(area / rile) / warning-(ul / urile): Nu imi da nici o eroare
Liniile de cod / sursa / script-ul(obligatoriu): Nu stiu ce trebuie sa postez daca imi spuneti unde trebuie sa ma uit
Imagini / Video (optional):
Ati incercat sa rezolvati singur?:Am cautat in gm si nu stiu unde trebuie sa ma uit

text.gif

SKIPE : EDUARD.SENNOW

10 answers to this question

Recommended Posts

  • 0
Posted

Unde e bucata de script care afla daca player-ul are wanted , daca este omorat de un politist ? Eu nu o vad ...

  • Upvote 1
  • 0
Posted

Arata OnPlayerDeath.

 

public OnPlayerDeath(playerid, killerid, reason) {
 #if defined DEBUG
     printf("[debug] (%d, %d, %d)", playerid, killerid, reason);
 #endif

 
 if(killerid != INVALID_PLAYER_ID)
 {
  new turfkiller, turfplayerid;
  if(PlayerPaintballing[playerid] != 0)
  {
   if(pTeam[playerid] != pTeam[killerid])
   {
    if(pTeam[playerid] == 1)
    {
     TeamScore2++;
    }
    
    if(pTeam[playerid] == 2)
    {
     TeamScore1++;
    }
    new string[500];

 
    KillP[killerid]++;
    

    format(string, sizeof(string), "You have killed %s. You now have %d kills.",playerVariables[playerid][pNormalName], KillP[killerid]);
    SendClientMessage(killerid, COLOR_GENANNOUNCE, string);
     
    format(string, sizeof(string), "You have been killed by %s.",playerVariables[killerid][pNormalName]);
    SendClientMessage(playerid, COLOR_GENANNOUNCE, string);
  
    PaintKillStreak[killerid]++;
    PaintKillStreak[playerid] = 0;
    foreach(Player, x)
    {
     if(PlayerPaintballing[x] == 1)
     {
      if(PaintKillStreak[killerid] == 2)
      {
       format(string, sizeof(string), "~y~%s~w~ double kill!", playerVariables[killerid][pNormalName]);
       GameTextForPlayer(x, string, 3000, 4);
      }
      else if(PaintKillStreak[killerid] == 3)
      {
       format(string, sizeof(string), "~y~%s~w~ hattrick!", playerVariables[killerid][pNormalName]);
       GameTextForPlayer(x, string, 3000, 4);
      }
      else if(PaintKillStreak[killerid] == 4)
      {
       format(string, sizeof(string), "~y~%s~w~ poker!", playerVariables[killerid][pNormalName]);
       GameTextForPlayer(x, string, 3000, 4);
      }
      else if(PaintKillStreak[killerid] == 6)
      {
       format(string, sizeof(string), "~y~%s~w~ godlike!", playerVariables[killerid][pNormalName]);
       GameTextForPlayer(x, string, 3000, 4);
      }
      else if(PaintKillStreak[killerid] == 8)
      {
       format(string, sizeof(string), "~y~%s~w~ rampage!", playerVariables[killerid][pNormalName]);
       GameTextForPlayer(x, string, 3000, 4);
      }
      SendDeathMessageToPlayer(x, killerid, playerid, reason);
     }
    }
    return 1;
   }
  }

public OnPlayerDeath(playerid, killerid, reason) {
 #if defined DEBUG
     printf("[debug] (%d, %d, %d)", playerid, killerid, reason);
 #endif

 
 if(killerid != INVALID_PLAYER_ID)
 {
  new turfkiller, turfplayerid;
  if(PlayerPaintballing[playerid] != 0)
  {
   if(pTeam[playerid] != pTeam[killerid])
   {
    if(pTeam[playerid] == 1)
    {
     TeamScore2++;
    }
    
    if(pTeam[playerid] == 2)
    {
     TeamScore1++;
    }
    new string[500];

 
    KillP[killerid]++;
    

    format(string, sizeof(string), "You have killed %s. You now have %d kills.",playerVariables[playerid][pNormalName], KillP[killerid]);
    SendClientMessage(killerid, COLOR_GENANNOUNCE, string);
     
    format(string, sizeof(string), "You have been killed by %s.",playerVariables[killerid][pNormalName]);
    SendClientMessage(playerid, COLOR_GENANNOUNCE, string);
  
    PaintKillStreak[killerid]++;
    PaintKillStreak[playerid] = 0;
    foreach(Player, x)
    {
     if(PlayerPaintballing[x] == 1)
     {
      if(PaintKillStreak[killerid] == 2)
      {
       format(string, sizeof(string), "~y~%s~w~ double kill!", playerVariables[killerid][pNormalName]);
       GameTextForPlayer(x, string, 3000, 4);
      }
      else if(PaintKillStreak[killerid] == 3)
      {
       format(string, sizeof(string), "~y~%s~w~ hattrick!", playerVariables[killerid][pNormalName]);
       GameTextForPlayer(x, string, 3000, 4);
      }
      else if(PaintKillStreak[killerid] == 4)
      {
       format(string, sizeof(string), "~y~%s~w~ poker!", playerVariables[killerid][pNormalName]);
       GameTextForPlayer(x, string, 3000, 4);
      }
      else if(PaintKillStreak[killerid] == 6)
      {
       format(string, sizeof(string), "~y~%s~w~ godlike!", playerVariables[killerid][pNormalName]);
       GameTextForPlayer(x, string, 3000, 4);
      }
      else if(PaintKillStreak[killerid] == 8)
      {
       format(string, sizeof(string), "~y~%s~w~ rampage!", playerVariables[killerid][pNormalName]);
       GameTextForPlayer(x, string, 3000, 4);
      }
      SendDeathMessageToPlayer(x, killerid, playerid, reason);
     }
    }
    return 1;
   }
  }

 if(dDrugsTime[playerid] >= 1)
  {
   SendClientMessage(playerid, -1, "You have failed to take the drugs.");
   dDrugsTime[playerid] = 0;
   ClearAnimations(playerid);
   playerVariables[playerid][pFreezeType] = 0;
   playerVariables[playerid][pFreezeTime] = 0;
  }
  
  if(playerVariables[killerid][pGroup] == 4)
  {
   if(Hit[killerid] == playerid)
   {
    new Float: dist = GetDistanceBetweenPlayers(playerid, killerid);
    playerVariables[killerid][pMoney] += playerVariables[playerid][pHeadValue];
    Hitman[playerid] = -1;
    Hit[killerid] = -1;
    format(szMessage, sizeof(szMessage), "[AGENCY NEWS] %s finished the contract on %s and received $%s. Distance: %.0f", playerVariables[killerid][pNormalName], playerVariables[playerid][pNormalName], NumberFormat(playerVariables[playerid][pHeadValue]), dist);
    SendToGroup(4, COLOR_RADIOCHAT, szMessage);
    playerVariables[playerid][pHeadValue] = 0;
    playerVariables[playerid][pCheckpoint] = 0;
    DisablePlayerCheckpoint(playerid);
    FindedPlayer[playerid] = -1;
   }
  }

  new string[256];
  if((playerVariables[playerid][pGroup] != 1 && playerVariables[playerid][pGroup] != 10) && (groupVariables[playerVariables[killerid][pGroup]][gInWar] == 0 || groupVariables[playerVariables[playerid][pGroup]][gInWar] == 0) && (PlayerPaintballing[killerid] == 0 && PlayerPaintballing[playerid] == 0) && (playerVariables[killerid][pGroup] != 10 && playerVariables[killerid][pGroup] != 1) && (playerVariables[killerid][pGroup] != playerVariables[playerid][pGroup]))
  {
   WantedID[playerid] = killerid;
   SCM(playerid, COLOR_TEAL, "You have been attacked by another player. You have 60 seconds to call the police to report this crime. Use /call 112.");
   WantedIDTime[playerid] = 60;
  }
  

  if((playerVariables[playerid][pGroup] == 5 || playerVariables[playerid][pGroup] == 6 || playerVariables[playerid][pGroup] == 8 || playerVariables[playerid][pGroup] == 9 || playerVariables[playerid][pGroup] == 14 || playerVariables[playerid][pGroup] == 15) && (playerVariables[killerid][pGroup] == 5 || playerVariables[killerid][pGroup] == 6 || playerVariables[killerid][pGroup] == 8 || playerVariables[killerid][pGroup] == 9
  || playerVariables[playerid][pGroup] == 14 || playerVariables[playerid][pGroup] == 15))
  {
   for(new i = 1; i <= sizeof(TurfInfo)-1; i++)
   {
    if(IsPlayerInTurf(playerid, i) == 1)
    {
     turfplayerid = i;
     break;
    }
   }
   for(new i = 1; i <= sizeof(TurfInfo)-1; i++)
   {
    if(IsPlayerInTurf(killerid, i) == 1)
    {
     turfkiller = i;
     break;
    }
   }
   if(WarInfo[turfplayerid][wTime] > 0 && WarInfo[turfkiller][wTime] > 0)
   {
    if(turfplayerid == turfkiller)
    {
     if(playerVariables[playerid][pGroup] == WarInfo[turfplayerid][wAttacker] && playerVariables[killerid][pGroup] == WarInfo[turfplayerid][wFaction])
     {
      playerVariables[playerid][pWarDeaths] += 1;
      new Float: dist2;
      dist2 = GetDistanceBetweenPlayers(playerid, killerid);
      format(string, sizeof(string), "%s(%d) has killed you from %.0f meters.", playerVariables[killerid][pNormalName], killerid, dist2);
      SCM(playerid, COLOR_GENANNOUNCE, string);
      
      groupVariables[WarInfo[turfkiller][wFaction]][gScore] += 1;
      playerVariables[killerid][pWarScore] += 1;
      new Float: dist;
      dist = GetDistanceBetweenPlayers(killerid, playerid);
      format(string, sizeof(string), "You have killed %s(%d) from %.0f meters.", playerVariables[playerid][pNormalName], playerid, dist);
      SCM(killerid, COLOR_GENANNOUNCE, string);
      playerVariables[killerid][pWarKillStreak]++;
      playerVariables[playerid][pWarKillStreak] = 0;
      
      foreach(Player, x)
      {
       if(playerVariables[x][pGroup] == WarInfo[turfplayerid][wAttacker] || playerVariables[x][pGroup] == WarInfo[turfplayerid][wFaction])
       {
        if(playerVariables[killerid][pWarKillStreak] == 2)
        {
         format(string, sizeof(string), "~y~%s~w~ double kill!", playerVariables[killerid][pNormalName]);
         GameTextForPlayer(x, string, 3000, 4);
        }
        else if(playerVariables[killerid][pWarKillStreak] == 3)
        {
         format(string, sizeof(string), "~y~%s~w~ hattrick!", playerVariables[killerid][pNormalName]);
         GameTextForPlayer(x, string, 3000, 4);
        }
        else if(playerVariables[killerid][pWarKillStreak] == 4)
        {
         format(string, sizeof(string), "~y~%s~w~ poker!", playerVariables[killerid][pNormalName]);
         GameTextForPlayer(x, string, 3000, 4);
        }
        else if(playerVariables[killerid][pWarKillStreak] == 6)
        {
         format(string, sizeof(string), "~y~%s~w~ godlike!", playerVariables[killerid][pNormalName]);
         GameTextForPlayer(x, string, 3000, 4);
        }
        else if(playerVariables[killerid][pWarKillStreak] == 8)
        {
         format(string, sizeof(string), "~y~%s~w~ rampage!", playerVariables[killerid][pNormalName]);
         GameTextForPlayer(x, string, 3000, 4);
        }
        SendDeathMessageToPlayer(x, killerid, playerid, reason);
       }
      }
      SCM(playerid, COLOR_LIGHTBLUE, "You will be spawned in the HQ.");
     }
     else if(playerVariables[killerid][pGroup] == WarInfo[turfkiller][wAttacker] && playerVariables[playerid][pGroup] == WarInfo[turfkiller][wFaction])
     {
      playerVariables[playerid][pWarDeaths] += 1;
      new Float: dist2;
      dist2 = GetDistanceBetweenPlayers(playerid, killerid);
      format(string, sizeof(string), "%s(%d) has killed you from %.0f meters.", playerVariables[killerid][pNormalName], killerid, dist2);
      SCM(playerid, COLOR_GENANNOUNCE, string);
      new Float: dist;
      dist = GetDistanceBetweenPlayers(killerid, playerid);
      groupVariables[WarInfo[turfkiller][wAttacker]][gScore] += 1;
      playerVariables[killerid][pWarScore] += 1;
      format(string, sizeof(string), "You have killed %s(%d) from %.0f meters", playerVariables[playerid][pNormalName], playerid, dist);
      SCM(killerid, COLOR_GENANNOUNCE, string);
      playerVariables[killerid][pWarKillStreak]++;
      playerVariables[playerid][pWarKillStreak] = 0;
      
      foreach(Player, x)
      {
       if(playerVariables[x][pGroup] == WarInfo[turfplayerid][wAttacker] || playerVariables[x][pGroup] == WarInfo[turfplayerid][wFaction])
       {
        if(playerVariables[killerid][pWarKillStreak] == 2)
        {
         format(string, sizeof(string), "~y~%s~w~ double kill!", playerVariables[killerid][pNormalName]);
         GameTextForPlayer(x, string, 3000, 4);
        }
        else if(playerVariables[killerid][pWarKillStreak] == 3)
        {
         format(string, sizeof(string), "~y~%s~w~ hattrick!", playerVariables[killerid][pNormalName]);
         GameTextForPlayer(x, string, 3000, 4);
        }
        else if(playerVariables[killerid][pWarKillStreak] == 4)
        {
         format(string, sizeof(string), "~y~%s~w~ poker!", playerVariables[killerid][pNormalName]);
         GameTextForPlayer(x, string, 3000, 4);
        }
        else if(playerVariables[killerid][pWarKillStreak] == 6)
        {
         format(string, sizeof(string), "~y~%s~w~ godlike!", playerVariables[killerid][pNormalName]);
         GameTextForPlayer(x, string, 3000, 4);
        }
        else if(playerVariables[killerid][pWarKillStreak] == 8)
        {
         format(string, sizeof(string), "~y~%s~w~ rampage!", playerVariables[killerid][pNormalName]);
         GameTextForPlayer(x, string, 3000, 4);
        }
        SendDeathMessageToPlayer(x, killerid, playerid, reason);
       }
      }
      SCM(playerid, COLOR_LIGHTBLUE, "You will be spawned in the HQ.");
     }
    }
   }
  }
 }
 return 1;
}

text.gif

SKIPE : EDUARD.SENNOW

  • 0
Posted (edited)
Acum 2 ore, NoNamed a spus:

Unde e bucata de script care afla daca player-ul are wanted , daca este omorat de un politist ? Eu nu o vad ...

Da acum am observat ca aia im lipseste , multumesc NoNamed

Edited by marius11
  • 0
Posted
14 minutes ago, marius11 said:

Da acum am observat ca aia im lipseste , multumesc NoNamed

Cu placere . Pot inchide ?

  • 0
Posted
Just now, marius11 said:

Da ms foarte mult de ceva timp caut rezolvarea

Nu ai pentru ce . Topic Closed !

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.