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

FREE Photofix : 1.0.3 1.0.3

Нет прав для скачивания
C#:
using System.Linq;
using System.Collections.Generic;

namespace Oxide.Plugins
{
    [Info("Photofix", "Death", "1.0.3")]
    class Photofix : RustPlugin
    {
        void OnServerInitialized()
        {
            var photoEntityList = Facepunch.Pool.Get<List<PhotoEntity>>();

            photoEntityList.AddRange(BaseNetworkable.serverEntities.OfType<PhotoEntity>());

            foreach (var photoEntity in photoEntityList)
            {
                var imageData = FileStorage.server.Get(photoEntity.ImageCrc, FileStorage.Type.jpg, photoEntity.net.ID, 0);

                if (imageData == null)
                {
                    Puts($"Image data is null for {photoEntity.net.ID}. Destroying...");
                    photoEntity.Kill();
                }
            }

            Facepunch.Pool.FreeUnmanaged(ref photoEntityList);
        }
    }
}

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