Иконка ресурса

FREE LBigBox : 1.0.1 1.0.1

Нет прав для скачивания
C#:
// Все права принадлежат дискорд сообществу https://discord.gg/VgNHPpNrz6
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;

namespace Oxide.Plugins
{
    [Info("LBigBox", "Lore", "1.0.1")]
    internal class LBigBox : RustPlugin
    {
        private void OnServerInitialized()
        {
            var storages = UnityEngine.Object.FindObjectsOfType<StorageContainer>();

            foreach (StorageContainer storage in storages)
            {
                if (storage.name.Contains("woodbox_deployed"))
                {
                    OnEntitySpawned(storage);
                }
            }
        }

        void OnEntitySpawned(BaseNetworkable entity)
        {
            if (entity == null) return;

            if (entity is StorageContainer && entity.name.Contains("woodbox_deployed"))
            {
                StorageContainer storageContainer = entity as StorageContainer;

                if (storageContainer != null)
                {
                    storageContainer.panelName = "generic_resizable";

                    storageContainer.inventory.capacity = 18;

                    storageContainer.SendNetworkUpdate();
                }

            }
        }
    }
}

Автор
15FPS
Скачиваний
0
Просмотры
1
Первый выпуск
Обновление
Оценка
0.00 звёзд 0 оценок
Сверху