pain my friend, can the plugin be fixed to work when stashes are deployed???
thanks!!!

Entity Limit
Limit entities per player
Total Downloads: 703 - First Release: Jun 4, 2016 - Last Update: Jul 20, 2018
- 5/5, 11 likes
-
yes i have this probleme.
-
-
13:09 [Error] Failed to call hook 'OnEntitySpawned' on plugin 'EntityLimit v0.5.0' (NullReferenceException: Object reference not set to an instance of an object)
13:09 [Debug] at Oxide.Plugins.EntityLimit+PlayerLimit.Modify (.BasePlayer player, .BaseEntity entity) [0x00000] in <filename unknown>:0
at Oxide.Plugins.EntityLimit.OnEntitySpawned (.BaseNetworkable entity) [0x00000] in <filename unknown>:0
at Oxide.Plugins.EntityLimit.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
[DOUBLEPOST=1482149570][/DOUBLEPOST]This happens when the server has not restart for a long time -
Is possible to add External wood?
-
For that -
nope dude gate is gate wall is wall
So i need to add wall wood on this plugin. -
I modified the plugin to destroy the item that's attempting to be placed when the user has hit the entity limit.
Add a new function :
Code:static void DoRemove(BaseEntity Entity, bool gibs = true) { if (Entity != null) { Interface.Oxide.CallHook("OnRemovedEntity", Entity); if (!Entity.IsDestroyed) Entity.Kill(gibs ? BaseNetworkable.DestroyMode.Gib : BaseNetworkable.DestroyMode.None); } }
Code:if (playerEnt.Count == Cfg.MaxLimits[playerEnt.Name]) { if(player.net.connection.authLevel < 1){ player.ChatMessage(LangMsg("MAX_ENTITIES")); DoRemove(entity); }
Cheers, hope this helps someone out.
Question for the developer, whats the purpose of doing "inv.give"? I see it being done in a bunch of plugins. What is this doing :
Code:var item = ItemManager.CreateByName(entity.ShortPrefabName.Replace("_", "."), 1); if(item != null){ player.inventory.GiveItem(item, player.inventory.containerBelt); player.Command(string.Concat(new object[4] { (object) "note.inv ", (object) item.info.itemid, (object) " ", (object) "1" })); entity.KillMessage(); return; }
-
@PaiN Would there be a way to implement a command that will wipe any entities over that are over the set limit per player? I put this in today, almost a week after wipe, and was curious as to if there was a way for me to reduce everyone to the limits right now.
-
[DOUBLEPOST=1489017046][/DOUBLEPOST] -
-
-
-
Error?
Calling 'OnRemovedEntity' on 'EntityLimit v0.5.0' took 334ms
Failed to call hook 'OnRemovedEntity' on plugin 'EntityLimit v0.5.0' (NullReferenceException: Object reference not set to an instance of an object) -
-
Im guessing some items are excluded from the entity list like fridges and is there a way to limit foundations, walls, floors, staircases etc ?
-
-
some entities dont get limited, or they do but it doesnt work, example the sleeping bag, using
Code:"sleepingbag_leather_deployed": 2,
Code:(16:34:38) | Failed to call hook 'OnEntitySpawned' on plugin 'EntityLimit v0.5.0' (NullReferenceException: Object reference not set to an instance of an object) (16:34:38) | at Oxide.Plugins.EntityLimit+PlayerLimit.Modify (.BasePlayer player, .BaseEntity entity) [0x00000] in <filename unknown>:0 at Oxide.Plugins.EntityLimit.OnEntitySpawned (.BaseNetworkable entity) [0x00000] in <filename unknown>:0 at Oxide.Plugins.EntityLimit.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
-
-
any update regarding the sleeping bags issue that @hoppel mentioned ?