virobeast submitted a new resource:
No Loot - Remove all possible loot from your server, boxes / barrels / oil barrels
Read more about this resource...
NoLoot
Moved
Total Downloads: 422 - First Release: Dec 1, 2015 - Last Update: May 19, 2017
- 5/5, 5 likes
-
Wulf Community Admin
-
-
"chicken.prefab",
"horse.prefab",
"boar.prefab",
"stag.prefab",
"wolf.prefab",
"bear.prefab",
"resource-ores_stone-ore.prefab",
"resource-ores_metal-ore.prefab",
"resource-ores_sulfur-ore.prefab"
Different
animal
tree
grass
collection
How to remove
Is there ? -
guys, plugin is not working. has work plugin? need delete all barels and loot box on map!
-
Code:del Assets/bundled/Prefabs/autospawn/resource/loot del Assets/bundled/Prefabs/radtown
-
-
-
Samis code works to get rid of the error, and the script compiles. However, it does not seem to work.
Last edited by a moderator: Oct 25, 2016 -
Wulf Community Admin
-
I want to remove the barrels
Oil barrels and boxes are left in warehouses, spheres, radtown -
Wulf Community Admin
-
Remove this loot or reduce it on the map
Leave boxes and oil barrels in warehouses, spheres, radtownAttached Files:
-
-
Wulf Community Admin
-
How to leave on the sphere of oil barrels?
Say loot from an airplane does not drop out now
How to remove new loot in rust?
Code:namespace Oxide.Plugins { [Info("No Loot", "Wulf/lukespragg", "1.0.0", ResourceId = 1488)] [Description("Removes all loot containers and prevents them from spawning")] public class NoLoot : CovalencePlugin { private bool serverReady = false; #region Loot Handling private bool ProcessContainers(BaseEntity entity) { if (!entity.isActiveAndEnabled || entity.IsDestroyed) return false; if (!(entity is LootContainer || entity is JunkPile)) return false; var junkPile = entity as JunkPile; if (junkPile != null) { junkPile.CancelInvoke("TimeOut"); junkPile.CancelInvoke("CheckEmpty"); junkPile.CancelInvoke("Effect"); junkPile.CancelInvoke("SinkAndDestroy"); junkPile.Kill(); } else entity.Kill(); return true; } private void OnServerInitialized() { var loot = UnityEngine.Resources.FindObjectsOfTypeAll<LootContainer>(); var count = 0; foreach (var entity in loot) { if (entity.name.Contains("barrel")){ if (ProcessContainers(entity)) count++; } } Puts($"Removed {count} loot containers"); serverReady = true; } private void OnEntitySpawned(BaseEntity entity) { if (!serverReady) return; if (entity.OwnerID == 0) ProcessContainers(entity); } #endregion } }
Attached Files:
Last edited by a moderator: May 29, 2017 -