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 dont want to make the plugin that complex. I want the plugin to run smoothly since it logs every single entity built :p
     
  2. Yea, makes sense. Can imagine reading much from database will cause some issues.
     
  3. fix please
    objects deleted with the Foundation is not considered remote
     
  4. Maybe:
    void OnEntityGroundMissing(BaseEntity entity)
    Might fix it?
     
  5. @ pain. I tried setting the permission to wipe on a group in rcon and it says

    (14:21:38) | [RCON][50.46.215.93:49588] grant group admin entitylimit.wipe

    (14:21:38) | Permission 'entitylimit.wipe' doesn't exist

    I am testing on a new server. Which I don't have this on my regular so I didn't test it until today.

    Just fyi

    UPDATE: Found the permission in the .cs file Which is: entitylimit.admin
    it does not say this on the front page, can you please update to show this there. Less fortunate beginners using mods will not know where to search for it. :)

    Thanks,
     
    Last edited by a moderator: Aug 17, 2016
  6. Code:
     [08/19/2016 18:21:29] [Oxide] 18:21 [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
     
  7. The error is above the debug.
     
  8. {
    "MaxLimits": {
    "mining.quarry": 2
    }
    }

    Should my config contain clan options, I sweear it did last time
     
  9. Entity Limit | Page 3 | Oxide
     
  10. Not working for me :(
    I need this for the next wipe.

    It works with all the entities except quarrys.
     
  11. Are you sure ? I will test it today but I still think it works with a quarry.
     
  12. Did you tried it?
     
  13. Seems really like the quarry does override your checks. I've tried with limits of 1, and it gets still placed.
    The message is also still shown: You have reached the max allowed placed amount of this entity!

    The console throws also this error then:
    Code:
    18:50 [Error] Failed to call hook 'OnEntitySpawned' on plugin 'EntityLimit v0.4.0' (NullReferenceException: Object reference not set to an instance of an object)
    18:50 [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 
     
  14. Okay then.. I will look into it.
     
  15. PaiN updated Entity Limit with a new update entry:

    0.5

     
  16. It works again. THANKS!
     
  17. Any chance of getting this compatible with autopurge?
     
  18. Maybe you could also write what is wrong that it's not compatible with it.
     
  19. The only thing autopurge does is delete things. So people aren't getting credit toward their limit when autopurge deletes things.
     
  20. This would need a change on side of AutoPurge, but not on EntityLimit.
    I could implement an optional call of "OnEntityDeath" to transport the info that "something was removed" to EntityLimit.
    [DOUBLEPOST=1474574026][/DOUBLEPOST]@PaiN

    To fullfill the request of Bacon Overlord® you could quick integrate the hook "OnEntityKill". Found it actually in the Dll's. Maybe a new one...
    AutoPurge does "Kill" all ents, and this calls then the hook.
    Code:
    void OnEntityKill(BaseNetworkable entity)
    {
        if (entity == null) return;
        EntityDestroyed(entity);
    }