Advertisement
Akc3n7

Weapons Refill On HS

Feb 10th, 2023 (edited)
466
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.21 KB | None | 0 0
  1. #include < amxmodx >
  2. #include < cstrike >
  3. #include < hamsandwich >
  4.  
  5. public plugin_init() register_plugin("Weapons Refill On HS", "1.0", "A k c 3 n 7")
  6.  
  7. new const g_weapons[] = { CSW_P228, CSW_SCOUT, CSW_XM1014, CSW_MAC10, CSW_AUG, CSW_ELITE, CSW_FIVESEVEN, CSW_UMP45, CSW_SG550,  CSW_GALI, CSW_GALIL,
  8. CSW_FAMAS, CSW_USP, CSW_GLOCK18, CSW_AWP, CSW_MP5NAVY, CSW_M249, CSW_M3, CSW_M4A1, CSW_TMP, CSW_G3SG1, CSW_DEAGLE, CSW_SG552, CSW_AK47, CSW_P90 }
  9.  
  10. new const g_max_clip[] = { 13, 10, 7, 30, 30, 30, 20, 25, 30, 35,
  11. 35, 25, 12, 20, 10, 30, 100, 8, 30, 30, 20, 7, 30, 30, 50 }
  12.  
  13. public client_death(killer, victim, wpnindex, hitplace, TK)
  14. {            
  15.     static const m_pActiveItem = 373
  16.     new ammo = get_weapon_maxclip(wpnindex)
  17.    
  18.     for (new i = 0; i < sizeof (g_weapons); i++)
  19.        
  20.     if (wpnindex == g_weapons[i])
  21.     {  
  22.         if (hitplace == HIT_HEAD)
  23.         {
  24.             if( is_user_alive(killer))
  25.             {  
  26.                 cs_set_weapon_ammo( get_pdata_cbase( killer , m_pActiveItem ) , ammo )
  27.                                 client_cmd(killer, "spk ^"items/9mmclip1.wav^"")
  28.             }
  29.         }
  30.     }
  31. }
  32.    
  33. get_weapon_maxclip(wpnid = 0) {
  34.  
  35.     for (new i = 0; i < sizeof (g_weapons); i++)
  36.         if (wpnid == g_weapons[i])
  37.             return g_max_clip[i]
  38.  
  39.     return false
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement