Advertisement
Guest User

Untitled

a guest
Apr 1st, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. #define FILTERSCRIPT
  2. #define DAMAGE_COLT 20
  3. #define DAMAGE_SILENCED 20
  4. #define DAMAGE_DEAGLE 40
  5. #define DAMAGE_SHOTGUN 70
  6. #define DAMAGE_SAWNOFF 50
  7. #define DAMAGE_UZI 18
  8. #define DAMAGE_MP5 18
  9. #define DAMAGE_AK47 20
  10. #define DAMAGE_RIFLE 45
  11. #define DAMAGE_TEC9 18
  12. #define DAMAGE_M4 20
  13. #define DAMAGE_SNIPER 50
  14.  
  15. #include <a_samp>
  16.  
  17. #if defined FILTERSCRIPT
  18.  
  19. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
  20. }
  21. new damage = 0;
  22. switch(weaponid)
  23. {
  24. case 22: damage = DAMAGE_COLT;
  25. case 23: damage = DAMAGE_SILENCER;
  26. case 24: damage = DAMAGE_DEAGLE;
  27. case 25: damage = DAMAGE_SHOTGUN;
  28. case 26: damage = DAMAGE_SAWNOFF;
  29. case 28: damage = DAMAGE_UZI;
  30. case 29: damage = DAMAGE_MP5;
  31. case 30: damage = DAMAGE_AK47;
  32. case 31: damage = DAMAGE_M4;
  33. case 32: damage = DAMAGE_TEC9;
  34. case 33: damage = DAMAGE_RIFLE;
  35. case 34: damage = DAMAGE_SNIPER;
  36. }
  37. if(damage != 0 && !IsPlayerInRangeOfPoint(issuerid,distance,x,y,z))
  38. {
  39. if(armour > 0)
  40. {
  41. amount = armour - damage;
  42. if(amount < 0) return SetPlayerHealth(playerid,health-damage);
  43. return SetPlayerArmour(playerid,armour-damage);
  44. }
  45. else return SetPlayerHealth(playerid,health-damage);
  46. }
  47. return 1;
  48. }
  49.  
  50. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement