seroff

Free AMMOS Round 1.0 By Seroff

Dec 12th, 2017
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <fakemeta_util>
  3. #include <cstrike>
  4.  
  5. #define OFFSET_CLIPAMMO 51 //+ EXTRA_OFFSET_WEAPONS
  6. #define EXTRAOFFSET_WEAPONS 4 // weapon offsets are obviously only 4 steps higher on Linux!
  7.  
  8. new szCurWeapon,WeaponsMaxClips[] ={
  9. -1, 13, -1, 10, 1, 7, 1, 30, 30, 1, 30, 20, 25, 30, 35, 25,
  10. 12, 20, 10, 30, 100, 8, 30, 30, 20, 2, 7, 30, 30, -1, 50
  11. },PLUGIN[][]={"Free AMMOS Round", "1.0", "Seroff"};
  12.  
  13. public plugin_init(){
  14. register_plugin(PLUGIN[0],PLUGIN[1],PLUGIN[2]);
  15. szCurWeapon = get_user_msgid("CurWeapon");
  16. register_event("ResetHUD", "szAmmo", "be");
  17. }
  18.  
  19. new Weapon[]={
  20. CSW_P228,
  21. CSW_ELITE,
  22. CSW_FIVESEVEN,
  23. CSW_USP,
  24. CSW_GLOCK18,
  25. CSW_DEAGLE,
  26. CSW_SCOUT,
  27. CSW_XM1014,
  28. CSW_MAC10,
  29. CSW_AUG,
  30. CSW_UMP45,
  31. CSW_SG550,
  32. CSW_GALIL,
  33. CSW_AK47,
  34. CSW_AWP,
  35. CSW_MP5NAVY,
  36. CSW_M249,
  37. CSW_M3,
  38. CSW_M4A1,
  39. CSW_TMP,
  40. CSW_G3SG1,
  41. CSW_SG552,
  42. CSW_P90
  43. }
  44.  
  45. new WeaponAmmo[]={
  46. 52,
  47. 120,
  48. 100,
  49. 100,
  50. 120,
  51. 35,
  52. 90,
  53. 32,
  54. 100,
  55. 90,
  56. 100,
  57. 90,
  58. 90,
  59. 90,
  60. 30,
  61. 120,
  62. 200,
  63. 32,
  64. 90,
  65. 120,
  66. 90,
  67. 90,
  68. 100
  69. }
  70.  
  71. public szAmmo(id){
  72. set_task(0.1, "refill_ammo",id);
  73. set_task(0.1, "sz_getammo",id);
  74. }
  75.  
  76. public sz_getammo(id){
  77. for(new i;i<sizeof(Weapon);i++){
  78. if(user_has_weapon(id,Weapon[i])) cs_set_user_bpammo(id, Weapon[i], WeaponAmmo[i]);
  79. }
  80. }
  81.  
  82. public refill_ammo(id){
  83. for(new i;i<sizeof(Weapon);i++){
  84. if(user_has_weapon(id,Weapon[i])){
  85. new ent = fm_get_user_weapon_entity(id, Weapon[i]);
  86. if(pev_valid(ent)){
  87. set_pdata_int(ent, OFFSET_CLIPAMMO, WeaponsMaxClips[Weapon[i]], EXTRAOFFSET_WEAPONS);
  88. message_begin(MSG_ONE, szCurWeapon, _, id);
  89. write_byte(1);
  90. write_byte(Weapon[i]);
  91. write_byte(WeaponsMaxClips[Weapon[i]]);
  92. message_end();
  93. }
  94. }
  95. }
  96. }
Add Comment
Please, Sign In to add comment