Ejemplo n.º 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);
            }
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public void TurretShapeDataOnUnmount(coTurretShapeData thisobj, coTurretShape turret, coShapeBase player, int node)
 {
     player.call("RefreshVehicleHud", "0", "", "");
 }