should be stash.small, but about the error... Are you sure you are using latest version?

Entity Limit
Limit entities per player
Total Downloads: 703 - First Release: Jun 4, 2016 - Last Update: Jul 20, 2018
- 5/5, 11 likes
-
im give this error yes have final version.
Error with this: "small_stash_deployed": 2
Code:(12:25:36) | Failed to call hook 'OnEntitySpawned' on plugin 'EntityLimit v0.6.0' (NullReferenceException: Object reference not set to an instance of an object) (12:25:36) | 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 (Oxide.Core.Plugins.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
-
Is this working now?`is it crafted or deployed items?
-
Can this be extended to work with foundations? -
-
-
-
Confirmed. With small_stash_deployed then the limit is reached you get the message, but still able to place them.
Error:
Code:Failed to call hook 'OnEntitySpawned' on plugin 'EntityLimit v0.6.0' (NullReferenceException: Object reference not set to an instance of an object) 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 (Oxide.Core.Plugins.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
@PaiN, here is the deal. Small stash has the different name of the item, like the spawn bag. So you(in your case) have to manually modify the item, not jst replacing the underline with dots.
So here is the fix:
Under lines 68-69 add the code for that stashes, like this:
Code:if (entity.ShortPrefabName.Contains("sleeping")) item = ItemManager.CreateByName("sleepingbag"); if (entity.ShortPrefabName == "small_stash_deployed") item = ItemManager.CreateByName("stash.small");
Basicly, if I would do something like that I would've create a dict for the replacments. Never founght that placed items has the same name, just with underlines... with some exceptions, as we see it. -
PaiN updated Entity Limit with a new update entry:
0.6.1
-
thanx vlad!!! -
AFTER UPDATE NOW:
(19:46:10) | Error while compiling: EntityLimit.cs(9,36): error CS1525: Unexpected symbol `0.1' -
"0.6.1" need this!
-
Wulf Community Admin
Wulf updated Entity Limit with a new update entry:
0.6.1
-
-
I get the message "You have reached the max... " but I can still place deployable??
Attached Files:
-
-
Also - I forgot to mention it - it would be a good idea to check if the item exists after we created it. What if more items have(or would have) the different names? Better safe then sorry =)
[DOUBLEPOST=1512845901][/DOUBLEPOST] -
Yes last version also of oxide
[DOUBLEPOST=1512846294][/DOUBLEPOST](20:03:45) | Failed to call hook 'OnEntitySpawned' on plugin 'EntityLimit v0.6.1' (NullReferenceException: Object reference not set to an instance of an object)
(20:03:45) | 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 (Oxide.Core.Plugins.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
(20:03:50) | [ServerVar] giving PlayerKnownAsRay 1 x Search Light
(20:03:53) | Failed to call hook 'OnEntitySpawned' on plugin 'EntityLimit v0.6.1' (NullReferenceException: Object reference not set to an instance of an object)
(20:03:53) | 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 (Oxide.Core.Plugins.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 -
-
Search Light
-
Ok, so - tunalight and searchlite are also not just a replacment from _ to dot.
@PlayerKnownAsRay - add this code after the line 71:
if (entity.ShortPrefabName == "tunalight.deployed")
item = ItemManager.CreateByName("tunalight");
I have no idea. I think the best solution would be to just re-write the whole plugin itself...
@PaiN, also - why using OnEntityBuild while you could've use CanBuild? You won't have to destory entity and won't have to give the item back in the first place...
Aaaand... for some reason I'm getting kicked with RPC error in DoPlace, both with and without the plugin. That's it. Enought Rust for 2day...