Advertisement
Guest User

Untitled

a guest
Sep 30th, 2014
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public OnPlayerDeath(playerid, killerid, reason)
  2. {
  3.     if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid) && PlayerInfo[playerid][pLogado] > 0)
  4.     {
  5.         if(PlayerInfo[playerid][pHeadValue] > 0 && PlayerInfo[killerid][pMember] == 11 || PlayerInfo[killerid][pLeader] == 11)
  6.         {
  7.             if(GoChase[killerid] == playerid)
  8.             {
  9.                 new string[256];
  10.                 new nomegay[MAX_PLAYER_NAME];
  11.                 new nomegay2[MAX_PLAYER_NAME];
  12.                 GetPlayerName(playerid, nomegay, sizeof(nomegay));
  13.                 GetPlayerName(killerid, nomegay2, sizeof(nomegay2));
  14.                 new killer[MAX_PLAYER_NAME];
  15.                 GetPlayerName(killerid, killer, sizeof(killer));
  16.                 SafeGivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]);
  17.                 format(string,128,"* O assassino %s cumpriu o contrato à cabeça de %s e adquiriu um valor de R$%d",killer,nomegay,PlayerInfo[playerid][pHeadValue]);
  18.                 SendRadioMessage(11, TEAM_GROVE_COLOR, string);
  19.                 SendClientMessage(playerid, TEAM_GROVE_COLOR, "Um assassino cumpriu o contrato em você.");
  20.                 PlayerInfo[playerid][pHeadValue] = 0;
  21.                 GotHit[playerid] = 0;
  22.                 GetChased[playerid] = 999;
  23.                 GoChase[killerid] = 999;
  24.             }
  25.         }
  26.         else
  27.         {
  28.             TogglePlayerControllable(playerid, 0);
  29.             new rand;
  30.             rand = random(sizeof(SpawnHP));
  31.             PlayerInfo[playerid][pInt] = 1;
  32.             PlayerInfo[playerid][pPos_x] = SpawnHP[rand][0];
  33.             PlayerInfo[playerid][pPos_y] = SpawnHP[rand][1];
  34.             PlayerInfo[playerid][pPos_z] = SpawnHP[rand][2];
  35.             LoopingAnim(playerid, "CRACK","crckdeth2",4.0,0,0,0,1,1);//Anim de caido
  36.  
  37.             SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z]);
  38.             SetPlayerCameraPos(playerid, 1460.8494, -156.1998, 1003.7289);
  39.             SetPlayerCameraLookAt(playerid, 1461.6353, -156.8163, 1003.3052);
  40.             SetPlayerFacingAngle(playerid, 90.0);
  41.             //acResetWeapons(playerid);
  42.             FumandoDorgas[playerid] = 0;
  43.             HavingBall[playerid] = 0;
  44.             MortoPcop[playerid] = 0;
  45.             PlayerInfo[playerid][pMaconha] = 0;
  46.             PlayerInfo[playerid][pCocaina] = 0;
  47.             PlayerInfo[playerid][pCrack] = 0;
  48.             PlayerInfo[playerid][pLSD] = 0;
  49.             if(HavingBall[playerid]) Baller = 999;
  50.             //
  51.             new string[255];
  52.             new nomegay[MAX_PLAYER_NAME];
  53.             new nomegay2[MAX_PLAYER_NAME];
  54.             GetPlayerName(playerid, nomegay, sizeof(nomegay));
  55.             GetPlayerName(killerid, nomegay2, sizeof(nomegay2));
  56.             //
  57.             new rtext[128];
  58.             if(reason == 0) { rtext = "a socos."; }
  59.             else if(reason == 1) { rtext = "com um soco ingles."; }
  60.             else if(reason == 2) { rtext = "com taco de Golfe"; }
  61.             else if(reason == 3) { rtext = "com um cassetete."; }
  62.             else if(reason == 4) { rtext = "com uma faca."; }
  63.             else if(reason == 5) { rtext = "com um bastão de Baseball."; }
  64.             else if(reason == 6) { rtext = "com uma pá."; }
  65.             else if(reason == 7) { rtext = "com um taco de bilhar."; }
  66.             else if(reason == 8) { rtext = "com uma Katana."; }
  67.             else if(reason == 9) { rtext = "com uma Serra Eletrica"; }
  68.             else if(reason == 10) { rtext = "com um Pinto de borracha duplo "; }
  69.             else if(reason == 11) { rtext = "com um Pinto de borracha "; }
  70.             else if(reason == 12) { rtext = "com um Vibrador "; }
  71.             else if(reason == 13) { rtext = "com um Vibrador "; }
  72.             else if(reason == 14) { rtext = "com um Buquê de Flores"; }
  73.             else if(reason == 15) { rtext = "com uma Bengala"; }
  74.             else if(reason == 16) { rtext = "com uma Granada"; }
  75.             else if(reason == 17) { rtext = "com uma Bomba de Gas"; }
  76.             else if(reason == 18) { rtext = "com um Coqtel Molotov"; }
  77.             else if(reason == 22) { rtext = "com tiros de uma Colt45"; }
  78.             else if(reason == 23) { rtext = "com tiros de uma Colt45 com Silenciador"; }
  79.             else if(reason == 24) { rtext = "com tiros de uma Desert Eagle"; }
  80.             else if(reason == 25) { rtext = "com tiros de uma Shotgun"; }
  81.             else if(reason == 26) { rtext = "com tiros de uma Sawnoff"; }
  82.             else if(reason == 27) { rtext = "com tiros de uma Combat Shotgun"; }
  83.             else if(reason == 28) { rtext = "com tiros de uma Micro Uzi"; }
  84.             else if(reason == 29) { rtext = "com tiros de uma MP5"; }
  85.             else if(reason == 30) { rtext = "com tiros de uma AK-47"; }
  86.             else if(reason == 31) { rtext = "com tiros de uma M4"; }
  87.             else if(reason == 32) { rtext = "com tiros de uma Tec-9"; }
  88.             else if(reason == 33) { rtext = "com tiros de uma Country Rifle"; }
  89.             else if(reason == 34) { rtext = "com tiros de uma Sniper Rifle"; }
  90.             else if(reason == 35) { rtext = "com tiros de uma BAZOOKA"; }
  91.             else if(reason == 36) { rtext = "com tiros de uma BAZOOKA DE TIRO PERSEGUIDOR"; }
  92.             else if(reason == 37) { rtext = "com um Lança Chamas"; }
  93.             else if(reason == 38) { rtext = "com tiros de uma Minigun"; }
  94.             else if(reason == 39) { rtext = "com Bombas Armadas"; }
  95.             else if(reason == 40) { rtext = "com um Detonador"; }
  96.             else if(reason == 41) { rtext = "com um Spray"; }
  97.             else if(reason == 42) { rtext = "com um extintor de incendios"; }
  98.             else if(reason == 47) { rtext = "FAKE PISTOL (( Sei la queporraéessa ))"; }
  99.             else if(reason == 49) { rtext = "Atropelado "; }
  100.             else if(reason == 50) { rtext = "nas hélices de um helicoptero"; }
  101.             else if(reason == 51) { rtext = "com uma explosão"; }
  102.             else if(reason == 53) { rtext = "morreu afogado. "; }
  103.             else if(reason == 54) { rtext = "caiu de um lugar alto e morreu."; }
  104.             else if(reason == 255) { rtext = " morreu sosinho"; }
  105.             else { rtext = "morreu ninguem sabe como !"; }
  106.             //
  107.             if(reason < 53)
  108.             {
  109.                 GetPlayerName(playerid, nomegay, sizeof(nomegay));
  110.                 GetPlayerName(killerid, nomegay2, sizeof(nomegay2));
  111.                 format(string, sizeof(string), "((%s te matou %s ))", nomegay2, rtext);
  112.                 SendClientMessage(playerid, COLOR_WHITE, string);
  113.  
  114.                 format(string, sizeof(string), "((Você matou %s %s ))", nomegay, rtext);
  115.                 SendClientMessage(killerid, COLOR_WHITE, string);
  116.             }
  117.             if(reason > 52)
  118.             {
  119.                 format(string, sizeof(string), "((Você %s ))", rtext);
  120.             }
  121.             //Chatkill Admins
  122.             new gunname[32], STRloka[64], fName[MAX_PLAYER_NAME], sName[MAX_PLAYER_NAME];
  123.             GetWeaponName(reason,gunname,sizeof(gunname));
  124.             GetPlayerName(playerid,fName,MAX_PLAYER_NAME);
  125.             GetPlayerName(killerid,sName,MAX_PLAYER_NAME);
  126.             format(STRloka, sizeof(STRloka), "%s matou %s usando %s.", sName, fName, gunname);
  127.             for(new lol; lol < MAX_PLAYERS; ++lol)
  128.             {
  129.             if(PlayerInfo[lol][pAdmin] >= 2)
  130.             {
  131.                 SendClientMessage(lol,0x33AA33AA,STRloka);
  132.             }
  133.             return 1;
  134. }
  135. //
  136.             //format(string, sizeof(string), " %s matou %s %s (ID: %d).", nomegay2, nomegay, rtext, reason);
  137.             //ABroadCast(COLOR_YELLOW,string, 1);
  138.             //SendAdminMessage(COLOR_LIGHTRED, string);
  139.             new y2, m2, d2;
  140.             new h2,mi2,s2;
  141.             getdate(y2,m2,d2);
  142.             gettime(h2,mi2,s2);
  143.             format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Matou %s %s.",d2,m2,y2,h2,mi2,s2,nomegay2, nomegay, rtext);
  144.             ChatKill(string);
  145.             //Armas cair
  146.             new Float:pPosX, Float:pPosY, Float:pPosZ;
  147.             GetPlayerPos(playerid, pPosX, pPosY, pPosZ);
  148.             /*if(!IsACop(playerid))
  149.             {
  150.                 if(admtrampando[playerid] == 0)
  151.                 {
  152.                     for(new i_slot = 0, gun, ammo; i_slot != 12; i_slot++)
  153.                     {
  154.                         GetPlayerWeaponData(playerid, i_slot, gun, ammo);
  155.                         if(gun != 0 && ammo != 0) CreateDroppedGun(gun, ammo, pPosX+random(2)-random(2), pPosY+random(2)-random(2), pPosZ);
  156.                     }
  157.                 }
  158.             }*/
  159.             //Armas Cair
  160.             SafeRemovePlayerFromVehicle(playerid);
  161.             ResetPlayerWeapons(playerid);
  162.             SafeResetPlayerWeapons(playerid);
  163.             //new string[128],
  164.             new name[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME]; //deathreason[20];
  165.             new y, m, d, h,mi,s;
  166.             getdate(y,m,d);
  167.             gettime(h,mi,s);
  168.             GetPlayerName(playerid, name, sizeof(name)); GetPlayerName(killerid, name2, sizeof(name2));
  169.             if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
  170.             if(IsPlayerAttachedObjectSlotUsed(playerid,2)) RemovePlayerAttachedObject(playerid,2);
  171.             if(IsPlayerAttachedObjectSlotUsed(playerid,3)) RemovePlayerAttachedObject(playerid,3);
  172.             if(IsPlayerAttachedObjectSlotUsed(playerid,4)) RemovePlayerAttachedObject(playerid,4);
  173.             if(IsPlayerAttachedObjectSlotUsed(playerid,5)) RemovePlayerAttachedObject(playerid,5);
  174.             if(IsPlayerAttachedObjectSlotUsed(playerid,6)) RemovePlayerAttachedObject(playerid,6);
  175.             if(IsPlayerAttachedObjectSlotUsed(playerid,7)) RemovePlayerAttachedObject(playerid,7);
  176.             if(IsPlayerAttachedObjectSlotUsed(playerid,8)) RemovePlayerAttachedObject(playerid,8);
  177.             if(IsPlayerAttachedObjectSlotUsed(playerid,9)) RemovePlayerAttachedObject(playerid,9);
  178.             Delete3DTextLabel(Description[playerid]);
  179.             Update3DTextLabelText(Description[playerid], 0x00000000, " ");
  180.             Attach3DTextLabelToPlayer(Description[playerid],playerid, 0.0, 0.0, 0.6)
  181.             Description[playerid] = Create3DTextLabel(" ", 0x00000000, 0.0, 0.0, 0.0, 50.0, -1, 0);
  182.             if(PlayerInfo[playerid][pAdmin] <= 3000 || admtrampando[playerid] == 0)
  183.             {
  184.                 new Float:Pos[3];
  185.                 GetPlayerPos(playerid, Pos[0],Pos[1],Pos[2]);
  186.                 morteInfo[playerid][mPosX] = Pos[0];
  187.                 morteInfo[playerid][mPosY] = Pos[1];
  188.                 morteInfo[playerid][mPosZ] = Pos[2];
  189.                 morteInfo[playerid][mVirWorld] = GetPlayerVirtualWorld(playerid);
  190.                 morteInfo[playerid][mInterior] = GetPlayerInterior(playerid);
  191.  
  192.                 Morto[playerid] = 1;
  193.                 new strg[150];
  194.                 SetPlayerInterior(playerid, 3);
  195.                 PlayerInfo[playerid][pInt] = 3;
  196.                 new level = PlayerInfo[playerid][pLevel];
  197.                 SetPlayerFacingAngle(playerid, 180.0);
  198.                 PlayerInfo[playerid][pJailTime] = level * 60;
  199.                 new hosp = PlayerInfo[playerid][pJailTime];
  200.                 format(strg, sizeof(strg), "Você está no Hospital por %d segundos.", hosp);
  201.                 SendClientMessage(playerid, COLOR_WHITE, strg);
  202.                 PlayerInfo[playerid][pJailed] = 7;
  203.                 Caido[playerid] = 1;
  204.                 SetPlayerHealth(playerid, 15);
  205.             }
  206.             else
  207.             {
  208.                 SendClientMessage(playerid, COLOR_WHITE, "Por estar em serviço admin você não foi ao Hospital.");
  209.             }
  210.             if(Attached[playerid] == 1) StopPlayerHoldingObject(playerid);
  211.             TextDrawHideForPlayer(playerid, Textdraw39[playerid]);
  212.             gPlayerSpawned[playerid] = 0;
  213.  
  214.             if(admtrampando[playerid] >= 1) { admtrampando[playerid] = 0; }
  215.             MedicBill[playerid] = 1;
  216.             if(gPlayerUsingLoopingAnim[playerid]) {
  217.                 gPlayerUsingLoopingAnim[playerid] = 0;
  218.             }
  219.             gPlayerSpawned[playerid] = 1;
  220.             SafeTime[playerid] = 60;
  221.             Checked[playerid] = 1;
  222.             PlayerGotSpottedRecently[playerid] = 1;
  223.             SetTimerEx("ResetAcWarn",20000,false, "i", playerid);
  224.  
  225.             if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 20)
  226.             {
  227.                 DisablePlayerCheckpoint(playerid);
  228.                 gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
  229.             }
  230.  
  231.             new caller = Mobile[playerid];
  232.             if(caller != 255)
  233.             {
  234.                 if(caller < 255)
  235.                 {
  236.                     SendClientMessage(caller,  COLOR_GRAD2, " Linha caiu (...)");
  237.                     CellTime[caller] = 0;
  238.                     CellTime[playerid] = 0;
  239.                     Mobile[caller] = 255;
  240.                 }
  241.                 Mobile[playerid] = 255;
  242.                 CellTime[playerid] = 0;
  243.             }
  244.             PlayerInfo[playerid][pMaskuse] = 0;
  245.  
  246.             if (BusrouteEast[playerid][0] != 0 || BusrouteWest[playerid][0] != 0)
  247.             {
  248.                 if (BusrouteEast[playerid][0] != 0) BusrouteEnd(playerid, BusrouteEast[playerid][1]);
  249.                 else if (BusrouteWest[playerid][0] != 0) BusrouteEnd(playerid, BusrouteWest[playerid][1]);
  250.                 else BusrouteEnd(playerid, 0);
  251.             }
  252.         }
  253.         if(IsACop(killerid) && PlayerInfo[killerid][pDuty] == 1) // POLICIAL em serviço
  254.         {
  255.             MortoPcop[playerid] = 1; //O cara que morreu vai para a Prisão após sair do Hospital
  256.         }
  257.        
  258.         //======================================================================
  259.         //              SISTEMA DE SU AUTOMATICO AO MATAR
  260.         //======================================================================
  261.         /*if(IsANorteno(killerid) && GoChase[killerid] != playerid)
  262.         {
  263.         }
  264.         if(IsACop(killerid) && PlayerInfo[killerid][pDuty] == 1) // POLICIAL em serviço
  265.         {
  266.             MortoPcop[playerid] = 1;
  267.         }
  268.         if(IsACop(killerid) && PlayerInfo[killerid][pDuty] == 0) //POLICIAL fora de serviço matou alguém
  269.         {
  270.             PlayerInfo[killerid][pWantedLevel] += 8;
  271.             SetPlayerCriminalEx(killerid, 255, "Homicidio");
  272.         }
  273.         if(IsAGang(killerid)) //Gangster matou alguém
  274.         {
  275.             PlayerInfo[killerid][pWantedLevel] += 8;
  276.             SetPlayerCriminalEx(killerid, 255, "Homicidio");
  277.         }
  278.         if(PlayerInfo[killerid][pMember] == 0 && PlayerInfo[killerid][pLeader] == 0) //Civil matou alguém
  279.         {
  280.             PlayerInfo[killerid][pWantedLevel] += 8;
  281.             SetPlayerCriminalEx(killerid, 255, "Homicidio");
  282.         }*/
  283.         //======================================================================
  284.         if(RouboNoCaixa[playerid] == 1)
  285.         {
  286.             RouboNoCaixa[playerid] = 0;
  287.             RoubandoCaixa = 0;
  288.             KillTimer(TempoRouboCaixa);
  289.         }
  290.         if(RouboNoArmazem[playerid] == 1)
  291.         {
  292.             RouboNoArmazem[playerid] = 0;
  293.             RoubandoArmazem = 0;
  294.             CRArmazem[playerid] = 0;
  295.             KillTimer(TempoRouboArmazem);
  296.         }
  297.         //
  298.         killerid = INVALID_PLAYER_ID;
  299.         SetRealMoney(playerid, ScriptMoney[playerid]);
  300.     }
  301.     return 0x01;
  302. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement