Entity Limit

Limit entities per player

Total Downloads: 703 - First Release: Jun 4, 2016 - Last Update: Jul 20, 2018

5/5, 11 likes
  1. I will look into it soon
     
  2. sounds good :)
     
  3. PaiN updated Entity Limit with a new update entry:

    0.6.2


    [DOUBLEPOST=1532080575][/DOUBLEPOST]
    The latest update should fix your issue but make sure you have to correct item names in the config file you had 2 or 3 of them wrong. For that reason I've added a couple updates ago the command /shortname (check the overview)

    Here is your fixed config:
    Code:
    {
      "MaxLimits": {
        "gates.external.high.stone": 35,
        "gates.external.high.wood": 35,
        "wall.external.high.stone": 35,
        "autoturret_deployed": 25,
        "landmine": 50,
        "spikes.floor": 15,
        "furnace.large": 6
      }
    }
    
     
  4. hi can u add this to lin79

    Code:
                                    if (entity.ShortPrefabName == "miningquarry_static")
                                        item = ItemManager.CreateByName("mining.quarry");

    else we cant block it, and get a error message.

    Code:
    [Error] Failed to call hook 'OnEntitySpawned' on plugin 'EntityLimit v0.6.2' (NullReferenceException: Object reference not set to an instance of an object)
      at Oxide.Plugins.EntityLimit+PlayerLimit.Modify (BasePlayer player, BaseEntity entity) [0x00210] in <6aa5ce3766a448df9ac8908f153028c5>:0
      at Oxide.Plugins.EntityLimit.OnEntitySpawned (BaseNetworkable entity) [0x000b7] in <6aa5ce3766a448df9ac8908f153028c5>:0
      at Oxide.Plugins.EntityLimit.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x001f3] in <6aa5ce3766a448df9ac8908f153028c5>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <db8eacac902a4df4bfeb92f0619ac1c8>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <bfa4e457157d4e089ab91719c5b1288b>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <bfa4e457157d4e089ab91719c5b1288b>:0 
    i think there are some more who use the quarrys and will block it :p
     
  5. Yep will do once I come back home ;)
     
  6. PaiN updated Entity Limit with a new update entry:

    0.6.3

     
  7. Getting another error when I do /remove all 300 and then click with the mouse on High External Stone Wall or High External Wood Wall I get this error below.

    Code:
    (16:56:06) | [Oxide] 17:56 [Error] Failed to call hook 'OnRemovedEntity' on plugin 'EntityLimit v0.6.3' (NullReferenceException: Object reference not set to an instance of an object)
      at Oxide.Plugins.EntityLimit.EntityDestroyed (BaseEntity entity) [0x0005b] in <dc6a73df56b74a09868ed10c626717ba>:0
      at Oxide.Plugins.EntityLimit.OnRemovedEntity (BaseEntity entity) [0x00000] in <dc6a73df56b74a09868ed10c626717ba>:0
      at Oxide.Plugins.EntityLimit.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00257] in <dc6a73df56b74a09868ed10c626717ba>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <4de2a9f5b1eb4f0ea3c4c9778603446d>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <bfa4e457157d4e089ab91719c5b1288b>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <bfa4e457157d4e089ab91719c5b1288b>:0
     
  8. So basically there are many high external stone walls connected to each other you do /remove all 300 then once you click on one of them(it should remove all of the connected ones) it gives an error correct ?
     
  9. Yes, you're correct.:)
     
  10. okay cool but does it remove the walls or throws an error and doesn't remove the walls ?
     
  11. I'm sorry I should have explained it a bit better. When you click on one of the walls it dose remove all walls but spews out that error above.
     
  12. Well I just did that I placed 6 connect high walls until it says I can not place any more (had my limit to 6 in the config) then used /remove all 300 it removed all of them and then I could place again another 6 of them and /remove all 300 again. Console 0 errors.. even made a video but its too big to upload here ^^
     
  13. hmm, that is very odd. maybe it's because the walls were placed before entity limit was added? It was only about 10 walls and I have the limit set to 35.


    I've been also noticing this error once in a while.

    Code:
    (16:56:00) | [Oxide] 17:55 [Error] Failed to call hook 'OnEntityDeath' on plugin 'EntityLimit v0.6.3' (NullReferenceException: Object reference not set to an instance of an object)
      at Oxide.Plugins.EntityLimit.EntityDestroyed (BaseEntity entity) [0x0005b] in <dc6a73df56b74a09868ed10c626717ba>:0
      at Oxide.Plugins.EntityLimit.OnEntityDeath (BaseCombatEntity entity, HitInfo hitInfo) [0x0000d] in <dc6a73df56b74a09868ed10c626717ba>:0
      at Oxide.Plugins.EntityLimit.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00221] in <dc6a73df56b74a09868ed10c626717ba>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <4de2a9f5b1eb4f0ea3c4c9778603446d>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <bfa4e457157d4e089ab91719c5b1288b>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <bfa4e457157d4e089ab91719c5b1288b>:0
    (16:56:01) | [Oxide] 17:55 [Error] Failed to call hook 'OnEntityDeath' on plugin 'EntityLimit v0.6.3' (NullReferenceException: Object reference not set to an instance of an object)
      at Oxide.Plugins.EntityLimit.EntityDestroyed (BaseEntity entity) [0x0005b] in <dc6a73df56b74a09868ed10c626717ba>:0
      at Oxide.Plugins.EntityLimit.OnEntityDeath (BaseCombatEntity entity, HitInfo hitInfo) [0x0000d] in <dc6a73df56b74a09868ed10c626717ba>:0
      at Oxide.Plugins.EntityLimit.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00221] in <dc6a73df56b74a09868ed10c626717ba>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <4de2a9f5b1eb4f0ea3c4c9778603446d>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <bfa4e457157d4e089ab91719c5b1288b>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <bfa4e457157d4e089ab91719c5b1288b>:0
     
  14. Send me your config file plz
     
  15. Heres whats inside the config file

    Code:
    {
      "MaxLimits": {
        "gates.external.high.stone": 35,
        "gates.external.high.wood": 35,
        "wall.external.high.stone": 35,
        "autoturret_deployed.prefab": 25,
        "landmine.prefab": 50,
        "spikes.floor.prefab": 15,
        "large_furnace_deployed": 6
      }
    }
    
     
  16. The error probably comes from your config file.. some replies ago I sent you a fixed one of yours
    https://oxidemod.org/threads/entity-limit.18547/page-10#post-409002