Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include < amxmodx >
- #include < cstrike >
- #include < hamsandwich >
- public plugin_init() register_plugin("Weapons Refill On HS", "1.0", "A k c 3 n 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,
- 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 }
- new const g_max_clip[] = { 13, 10, 7, 30, 30, 30, 20, 25, 30, 35,
- 35, 25, 12, 20, 10, 30, 100, 8, 30, 30, 20, 7, 30, 30, 50 }
- public client_death(killer, victim, wpnindex, hitplace, TK)
- {
- static const m_pActiveItem = 373
- new ammo = get_weapon_maxclip(wpnindex)
- for (new i = 0; i < sizeof (g_weapons); i++)
- if (wpnindex == g_weapons[i])
- {
- if (hitplace == HIT_HEAD)
- {
- if( is_user_alive(killer))
- {
- cs_set_weapon_ammo( get_pdata_cbase( killer , m_pActiveItem ) , ammo )
- client_cmd(killer, "spk ^"items/9mmclip1.wav^"")
- }
- }
- }
- }
- get_weapon_maxclip(wpnid = 0) {
- for (new i = 0; i < sizeof (g_weapons); i++)
- if (wpnid == g_weapons[i])
- return g_max_clip[i]
- return false
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement