you cant use the bp like learn button is there away to disable that if so that'd be nice
to many item drops in one place it cleans them up
what i need basically
Solved Cleanup dropped items
Discussion in 'Plugin Requests' started by GreenArrow, Jun 1, 2016.
-
Hello, I'm the current server owner of War of Ignorance and I constantly find myself banning children that decide to craft a ton of a certain item until it floods all on the ground and causes nothing but lag. I'm requesting a plugin similar to the already CleanUp plugin but instead of deployables all items that are dropped on the ground. For example when children spam Hunting Bows on the ground I can type "/clean "Hunting Bow" all" and it will remove all hunting bows that are on the ground. And maybe even a "/clean all" command to remove all dropped entities. (Guns, any form of dropped item)
-
Here's an untested snippet, should work. If someone wants to improve upon it, go ahead:
Code:[ConsoleCommand("cleandropped")] private void consoleRemoveAllDropped(ConsoleSystem.Arg arg) { if (arg.connection != null) return; var allDropped = UnityEngine.GameObject.FindObjectsOfType<DroppedItem>(); for (int i = 0; i < allDropped.Count(); i++) { var droppedItem = allDropped[i]; if (droppedItem == null) continue; droppedItem.Kill(BaseNetworkable.DestroyMode.None); } }
-
You can also change the despawn time of dropped items in server console. its sure does help to prevent crafting abuse.
example code below will change despawn to 5 seconds. of course that means anything that is dropped, loot crate or player.
Code:server.itemdespawn 5
-
Thank you for the support!
-
im confused by the "player" at the end
-
-