document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. new Tiros[MAX_PLAYERS];
  2.  
  3. public OnPlayerConnect(playerid)
  4. {
  5. Tiros[playerid] = 0;
  6. return 1;
  7. }
  8. public OnPlayerSpawn(playerid)
  9. {
  10. SetPlayerTeam(playerid,1);
  11. return 1;
  12. }
  13. public OnPlayerGiveDamage(playerid,damagedid,Float:amount,weaponid)
  14. {
  15. new Float:Vida;
  16. new Float:Colete;
  17. new Float:Dano;
  18. new Fala[20];
  19.  
  20. if(weaponid == 16 || weaponid == 34 || weaponid == 35 || weaponid == 38)
  21. {
  22. ApplyAnimation(damagedid,"PED","DAM_STOMACH_FRMFT",5.0,0,1,1,1,1,1);
  23. Tiros[damagedid] = 0;
  24. }
  25. if(weaponid == 24 || weaponid == 25 || weaponid == 27)
  26. {
  27. Tiros[damagedid]++;
  28.  
  29. if(Tiros[damagedid] > 4)
  30. {
  31. ApplyAnimation(damagedid,"PED","DAM_STOMACH_FRMFT",5.0,0,1,1,1,1,1);
  32. Tiros[damagedid] = 0;
  33. }
  34. }
  35. if(weaponid == 29 || weaponid == 30 || weaponid == 31)
  36. {
  37. Tiros[damagedid]++;
  38.  
  39. if(Tiros[damagedid] > 9)
  40. {
  41. ApplyAnimation(damagedid,"PED","DAM_STOMACH_FRMFT",5.0,0,1,1,1,1,1);
  42. Tiros[damagedid] = 0;
  43. }
  44. }
  45. GetPlayerArmour(damagedid,Colete);
  46. GetPlayerHealth(damagedid,Vida);
  47.  
  48. PlayerPlaySound(playerid,1131,0.0,0.0,0.0);
  49. PlayerPlaySound(damagedid,17802,0.0,0.0,0.0);
  50.  
  51. format(Fala,sizeof(Fala),"~r~-%0.0f",amount/2);
  52. GameTextForPlayer(damagedid,Fala,1000,3);
  53.  
  54. if(Colete > 0)
  55. {
  56. if(amount/2 > Colete)
  57. {
  58. Dano = amount/2 - Colete;
  59. Vida = Vida - Dano;
  60.  
  61. SetPlayerArmour(damagedid,0.0);
  62. SetPlayerHealth(damagedid,Vida);
  63.  
  64. return 0;
  65. }
  66. Colete = Colete - amount/2;
  67. SetPlayerArmour(damagedid,Colete);
  68. }
  69. if(Colete < 1)
  70. {
  71. Vida = Vida - amount/2;
  72. SetPlayerHealth(damagedid,Vida);
  73. }
  74. return 0;
  75. }
');