public void AmmoClipOnPickup(coItem thisobj, string obj, coPlayer shape, string amount, int nameSpaceDepth)
            {
            int nsd = nameSpaceDepth + 1;

            if (!console.ParentExecute(thisobj, "onPickup", nsd, new string[] { thisobj, obj, shape, amount }).AsBool())
                return;

            AudioServerPlay3D("WeaponPickupSound", shape.getTransform());

            coItemData image = shape.getMountedImage(WeaponSlot);

            if (image == 0)
                return;

            if (!console.isField(image, "clip") || console.Call(string.Format("{0}.clip", image), "getID") != console.Call(thisobj, "getID"))
                return;

            bool outOfAmmo = !shape.getImageAmmo(WeaponSlot);

            int amountInClips = 0;

            int currentAmmo = ShapeBaseShapeBaseGetInventory(shape, image["ammo"]);

            if (console.isObject(image["clip"]))
                amountInClips = ShapeBaseShapeBaseGetInventory(shape, image["clip"]);

            int t = console.GetVarInt(string.Format("{0}.ammo.maxInventory", image));

            amountInClips *= t;

            int amountloadedingun = console.GetVarInt(string.Format("{0}.remaining{1}", obj, console.GetVarString(string.Format("{0}.ammo", this))));

            amountInClips += amountloadedingun;



            GameConnectionSetAmmoAmountHud(shape["client"], currentAmmo, amountInClips);

            if (outOfAmmo)
                console.Call(image, "onClipEmpty", new string[] { shape, WeaponSlot.AsString() });
            }