Example #1
0
        public void WeaponOnPickup(coScriptObject thisobj, string obj, coShapeBase shape, int amount, int nameSpaceDepth)
            {
            int nsd = (nameSpaceDepth + 1);
            if (!console.ParentExecute(thisobj, "onPickup", nsd, new string[] { thisobj, obj, shape, amount.AsString() }).AsBool())
                return;


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

            if (shape.getClassName() == "Player" && shape.getMountedImage(WeaponSlot) == 0)
                shape.call("use", thisobj);
            }
 public bool ShapeBaseShapeBaseThrow(coShapeBase thisobj, coItemData data, int amount = 1)
     {
     bool functionresult = false;
     if (ShapeBaseShapeBaseGetInventory(thisobj, data) > 0)
         {
         coSimObject objectid = data.call("onThrow", thisobj, amount.AsString());
             {
             if (objectid != 0)
                 {
                 thisobj.call("throwObject", objectid);
                 AudioServerPlay3D("ThrowSnd", thisobj.getTransform());
                 functionresult = true;
                 }
             }
         }
     return functionresult;
     }