Problems with recycler

Making recycler for players and have problem with this on and off at the same time. How I can fix it

You can start with showing us code you are using

qA6TZwR9nqqXcCD.png Orange

You can start with showing us code you are using

I'm using this

 private const string recPrefab = "assets/bundled/prefabs/static/recycler_static.prefab";

        void SpawnRec(BasePlayer player)
        {
            Vector3 pos = player.transform.position + new Vector3(0, 300, 0);
            Recycler rec = GameManager.server.CreateEntity(recPrefab,new Vector3(0,300,0)) as Recycler;
            rec.OwnerID = player.userID;
            rec.SendMessage("SetDeployedBy", player, (SendMessageOptions) 1);
            rec.Spawn();

            StartLoot(rec,player);
            recUses[player.userID]--;
            SendReply(player,$"{recUses[player.userID]} осталось применений переработчика");
        }
        
        public void StartLoot(Recycler recycler,BasePlayer owner)
        {
            recycler.SetFlag(BaseEntity.Flags.Open, true, true);
            owner.inventory.loot.StartLootingEntity(recycler, false);
            owner.inventory.loot.AddContainer(recycler.inventory);
            owner.inventory.loot.SendImmediate();
            owner.ClientRPCPlayer(null, owner, "RPC_OpenLootPanel", recycler.panelName);
            
        }

Your opening recycle function is not correct. Its missing a lot of stuff

11N2oBTVt6F07Ow.png Orange

Your opening recycle function is not correct. Its missing a lot of stuff

Can you write how open it correctly or share some plugin that do this?

O2CBlD9DPZRMi8w.jpg Baks

Can you write how open it correctly or share some plugin that do this?

You can open game files and find that in BasePlayer or StorageContainer classes