using System.Collections.Generic; using UnityEngine; using Oxide.Core; using Oxide.Core.Plugins; namespace Oxide.Plugins { [Info("Snowmobile Storage Block", "Daniel", "1.0.0")] [Description("Blocks access to the storage of the Snowmobile.")] public class SnowmobileStorageBlock : RustPlugin { private HashSet snowmobilePrefabNames = new HashSet { "assets/content/vehicles/snowmobiles/subents/snowmobileitemstorage.prefab" }; private void OnLootEntity(BasePlayer player, StorageContainer container) { if (snowmobilePrefabNames.Contains(container.PrefabName) && container.OwnerID != player.userID) { player.ChatMessage("Access to Snowmobile storage is blocked."); container.SetFlag(BaseEntity.Flags.Locked, true); container.inventory.Clear(); } } } }