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

FREE FixKillWall : 1.0.0 1.0.0

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

namespace Oxide.Plugins
{
    [Info("FixKillWall", "Nimant", "1.0.0")]
    class FixKillWall : RustPlugin
    {															
		
		private const int ShipSize = 200;
		
		private void OnServerInitialized() 
		{			
			var instance = SingletonComponent<ValidBounds>.Instance;
			if (instance == null)
				PrintWarning("Стена смерти не найдена, изменение её размеров невозможно.");
			else
			{
				var worldSize = World.Size;
				var wallSize = instance.worldBounds.extents.x > instance.worldBounds.extents.z ? instance.worldBounds.extents.x : instance.worldBounds.extents.z;
				
				if (worldSize + ShipSize > wallSize)
				{
					var oldSize = instance.worldBounds.extents;
					instance.worldBounds.extents = new Vector3(worldSize + ShipSize, oldSize.y, worldSize + ShipSize);					
					
					PrintWarning($"Размеры стены смерти увеличены с {oldSize} до {instance.worldBounds.extents}.");
				}
				else
					PrintWarning($"Размеры стены смерти не менялись, - нет необходимости.");
			}
		}												
		
	}
	
}

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

Другие ресурсы пользователя 15FPS

Сверху