Advertisement
Guest User

0.3d R2 Realistic Weapon Bullet Damage R1 (Outdated))

a guest
Sep 22nd, 2011
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.87 KB | None | 0 0
  1. #include <a_samp>
  2. #define MaxHealth 100
  3. //damage multipliers
  4. #define Unarmed 7
  5. #define brass 5
  6. #define golf 4
  7. #define knife 2
  8. #define katana 1 // for instant kill
  9. #define dildo 6
  10. #define flowers 10
  11. #define grenades 1 // instant from grenades
  12. #define colt 3
  13. #define silenced 2.5
  14. #define deagle 2
  15. #define shotgun 2
  16. #define sawn 2.5
  17. #define combat 3
  18. #define SMG 4
  19. #define MP5 3.5
  20. #define AK47 3
  21. #define M4 3.2
  22. #define TEC9 4
  23. #define rife 1 // rifles instant kill ( country and sniper)
  24. #define launchers 1 // rocket launchers instant kill
  25. #define minigun 1
  26. #define spraycan 11 // small damage with spraycan
  27.  
  28. public OnFilterScriptInit()
  29. {
  30.     print("\n---------------------------------------");
  31.     print(" Realistic weapon damage by Th4_Evil     ");
  32.     print("---------------------------------------\n");
  33.     return 1;
  34. }
  35.  
  36. public OnFilterScriptExit()
  37. {
  38.     return 1;
  39. }
  40. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  41. {
  42.     new Float:pDamage;
  43.     new Float:health;
  44.     new Float:healthamount;
  45.     GetPlayerHealth(playerid,health);
  46.     healthamount = health + amount;
  47.     if(issuerid != INVALID_PLAYER_ID)
  48.     {
  49.     if(weaponid == 0)
  50.     {
  51.     pDamage = MaxHealth / Unarmed;
  52.     SetPlayerHealth(playerid, healthamount - pDamage);
  53.     }
  54.     if(weaponid == 1)
  55.     {
  56.     pDamage = MaxHealth / brass;
  57.     SetPlayerHealth(playerid, healthamount - pDamage);
  58.     }
  59.     if(weaponid == 2 || weaponid == 3 || weaponid == 5 || weaponid == 6 || weaponid == 7 || weaponid == 15)
  60.     {
  61.     pDamage = MaxHealth / golf;
  62.     SetPlayerHealth(playerid, healthamount - pDamage);
  63.     }
  64.     if(weaponid == 4)
  65.     {
  66.     pDamage = MaxHealth / knife;
  67.     SetPlayerHealth(playerid, healthamount - pDamage);
  68.     }
  69.     if(weaponid == 8 || weaponid == 9)
  70.     {
  71.     pDamage = MaxHealth / katana;
  72.     SetPlayerHealth(playerid, healthamount - pDamage);
  73.     }
  74.     if(weaponid == 10 || weaponid == 11 || weaponid == 12 || weaponid == 13)
  75.     {
  76.     pDamage = MaxHealth / dildo;
  77.     SetPlayerHealth(playerid, healthamount - pDamage);
  78.     }
  79.     if(weaponid == 14)
  80.     {
  81.     pDamage = MaxHealth / flowers;
  82.     SetPlayerHealth(playerid, healthamount - pDamage);
  83.     }
  84.     if(weaponid == 16)
  85.     {
  86.     pDamage = MaxHealth / grenades;
  87.     SetPlayerHealth(playerid, healthamount - pDamage);
  88.     }
  89.     if(weaponid == 22)
  90.     {
  91.     pDamage = MaxHealth / colt;
  92.     SetPlayerHealth(playerid, healthamount - pDamage);
  93.     }
  94.     if(weaponid == 23)
  95.     {
  96.     pDamage = MaxHealth / silenced;
  97.     SetPlayerHealth(playerid, healthamount - pDamage);
  98.     }
  99.     if(weaponid == 24)
  100.     {
  101.     pDamage = MaxHealth / deagle;
  102.     SetPlayerHealth(playerid, healthamount - pDamage);
  103.     }
  104.     if(weaponid == 25)
  105.     {
  106.     pDamage = MaxHealth / shotgun;
  107.     SetPlayerHealth(playerid, healthamount - pDamage);
  108.     }
  109.     if(weaponid == 26)
  110.     {
  111.     pDamage = MaxHealth / sawn;
  112.     SetPlayerHealth(playerid, healthamount - pDamage);
  113.     }
  114.     if(weaponid == 27)
  115.     {
  116.     pDamage = MaxHealth / combat;
  117.     SetPlayerHealth(playerid, healthamount - pDamage);
  118.     }
  119.     if(weaponid == 28)
  120.     {
  121.     pDamage = MaxHealth / SMG;
  122.     SetPlayerHealth(playerid, healthamount - pDamage);
  123.     }
  124.     if(weaponid == 29)
  125.     {
  126.     pDamage = MaxHealth / MP5;
  127.     SetPlayerHealth(playerid, healthamount - pDamage);
  128.     }
  129.     if(weaponid == 30)
  130.     {
  131.     pDamage = MaxHealth / AK47;
  132.     SetPlayerHealth(playerid, healthamount - pDamage);
  133.     }
  134.     if(weaponid == 31)
  135.     {
  136.     pDamage = MaxHealth / M4;
  137.     SetPlayerHealth(playerid, healthamount - pDamage);
  138.     }
  139.     if(weaponid == 32)
  140.     {
  141.     pDamage = MaxHealth / TEC9;
  142.     SetPlayerHealth(playerid, healthamount - pDamage);
  143.     }
  144.     if(weaponid == 33 || weaponid == 34)
  145.     {
  146.     pDamage = MaxHealth / rifle;
  147.     SetPlayerHealth(playerid, healthamount - pDamage);
  148.     }
  149.     if(weaponid == 35 || weaponid 36)
  150.     {
  151.     pDamage = MaxHealth / launchers;
  152.     SetPlayerHealth(playerid, healthamount - pDamage);
  153.     }
  154.     if(weaponid == 38)
  155.     {
  156.     pDamage = MaxHealth / minigun;
  157.     SetPlayerHealth(playerid, healthamount - pDamage);
  158.     }
  159.     if(weaponid == 41)
  160.     {
  161.     pDamage = MaxHealth / spraycan;
  162.     SetPlayerHealth(playerid, healthamount - pDamage);
  163.     }
  164.     }
  165.     return 1;
  166. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement