From f91c8b356113f50322e79cc7fec034da72835539 Mon Sep 17 00:00:00 2001 From: Greyscale Date: Sat, 16 Jan 2010 23:43:44 -0800 Subject: [PATCH] Unlimited shotgun ammo exploit fixed. --- src/zr/weapons/zmarket.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/zr/weapons/zmarket.inc b/src/zr/weapons/zmarket.inc index 9210785..7818959 100644 --- a/src/zr/weapons/zmarket.inc +++ b/src/zr/weapons/zmarket.inc @@ -918,10 +918,12 @@ stock bool:ZMarketEquip(client, const String:weapon[], bool:rebuy = false) return false; } - // Give ammo and preserve client's clip ammo value. - new clip = WeaponAmmoGetAmmo(weapons[slot], true); + // Give ammo and preserve client's clip ammo value on both primary/secondary weapons. + new prim_clip = WeaponAmmoGetAmmo(weapons[Slot_Primary], true); + new sec_clip = WeaponAmmoGetAmmo(weapons[Slot_Secondary], true); GivePlayerItem(client, weaponammo); - WeaponAmmoSetAmmo(weapons[slot], true, clip); + WeaponAmmoSetAmmo(weapons[Slot_Primary], true, prim_clip); + WeaponAmmoSetAmmo(weapons[Slot_Secondary], true, sec_clip); } return true;