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

FREE SafeZoneLootFix : 1.0.0 1.0.0

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

namespace Oxide.Plugins
{
	[Info("SafeZone loot fix", "turner#7777", "1.0.0")]
	[Description("Fixes a long standing bug where a player that goes outside a safezone can loot player's bodies inside the safezone")]
	public class SafeZoneLootFix : RustPlugin
	{
		object CanLootEntity(BasePlayer player, DroppedItemContainer container) => CanLoot(player, container);
		object CanLootEntity(BasePlayer player, LootableCorpse corpse) => CanLoot(player, corpse);

		object CanLoot(BasePlayer looter, BaseCombatEntity lootedEntity)
		{
			if (Physics.OverlapSphere(lootedEntity.transform.position, 0).Any(c => c.name.Contains("SafeZone")))
			{
				return false;
			}
			else
			{
				return null;
			}
		}
	}
}

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