BuildingRestriction

Approved BuildingRestriction 2.0

No permission to download

Jakkee

Plugin Developer
Plugin Developer
Contributor
Jul 28, 2014
1,463
284
83
Australia
Jakkee submitted a new resource:

BuildingRestriction - Limits the amount of foundations and height of a base

Description:
Limit the amount of foundations and height of a base.
This plugin supports DreTaX's Moderator Plugin

Installation:
- Place into Python folder
- Reload/Restart the server
- Done

INI:
[Config]
Max Height=5  //5 = 5 Pillars high
Max Foundations=9  //9 = 9 foundations connected to each other
Moderators bypass limits?=true
Admins bypass limits?=true

To do:
None, Tell me in discussions!
Read more about this resource...
 

maughanorama

Member
Member
Nov 27, 2014
181
10
18
43
cool addon .. i cnt get it to work and i seem to be getting this

NullReferenceException: Object reference not set to an instance of an object
NullReferenceException: Object reference not set to an instance of an object
at IronPython.Runtime.Operations.PythonOps.MakeString (System.Collections.Generic.IList`1<byte>) <0x0000f>
at IronPython.Runtime.Operations.DoubleOps.__new__ (IronPython.Runtime.CodeContext,IronPython.Runtime.Types.PythonType,System.Collections.Generic.IList`1<byte>) <0x000b3>
at (wrapper dynamic-method) object.CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,IronPython.Runtime.CodeContext,object,object) <0x00100>
at System.Dynamic.UpdateDelegates.UpdateAndExecute3<IronPython.Runtime.CodeContext, object, object, object> (System.Runtime.CompilerServices.CallSite,IronPython.Runtime.CodeContext,object,object) <0x003a4>
at (wrapper delegate-invoke) Microsoft.Scripting.Utils.Func`6<System.Func`5<System.Runtime.CompilerServices.CallSite, IronPython.Runtime.CodeContext, object, object, object>, System.Runtime.CompilerServices.CallSite, IronPython.Runtime.CodeContext, object, object, object>.invoke_object__this___Func`5<CallSite, CodeContext, object, object, object>_CallSite_CodeContext_object_object (System.Func`5<System.Runtime.CompilerServices.CallSite, IronPython.Runtime.CodeContext, object, object, object>,System.Runtime.CompilerServices.CallSite,IronPython.Runtime.CodeContext,object,object) <0x0006c>
at Microsoft.Scripting.Interpreter.FuncCallInstruction`6<System.Func`5<System.Runtime.CompilerServices.CallSite, IronPython.Runtime.CodeContext, object, object, object>, System.Runtime.CompilerServices.CallSite, IronPython.Runtime.CodeContext, object, object, object>.Run (Microsoft.Scripting.Interpreter.InterpretedFrame) <0x00181>
at Microsoft.Scripting.Interpreter.Interpreter.Run (Microsoft.Scripting.Interpreter.InterpretedFrame) <0x0007a>

UnityEngine.Debug:Internal_LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception, Object)
Fougerite.Logger:LogException(Exception, Object)
IronPythonModule.IPPlugin:Invoke(String, Object[])
IronPythonModule.IPPlugin:OnEntityDeployed(Player, Entity)
Fougerite.Hooks:EntityDeployed(Object)
StructureComponentDataBlock:DoAction1(BitStream, ItemRepresentation, NetworkMessageInfo&)
ItemRepresentation:RunAction(Int32, BitStream, NetworkMessageInfo&)
ItemRepresentation:RunServerAction(Int32, BitStream, NetworkMessageInfo&)
ItemRepresentation:Action1(BitStream, NetworkMessageInfo)
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
#=qaL2AMBCaBLCj4lGSCwjcBVYUs_5vzeQVgu44HVklVYQ=:#=qG_E6hqIvz6NLWQQCT2N5IA==(Object, Object[])
#=q$NUWz6aT_ypN3cz7K6ce2gVWapiYAlnLPGzKjIUfT2w=:#=qS9ntZNSJqwnPkZv_HZvsug==(BitStream, Object)
uLink.NetworkView:OnRPC(String, BitStream, NetworkMessageInfo)
uLink.NetworkViewBase:#=qpJfiNEhSKsosBj54zW21Bw==(String, BitStream, NetworkMessageInfo)
#=qjg$mq9k6hZwR1eaAS3eQ4dux$3oD_j8CRZte$f$nFV0=:#=qlGEZiB55BOeKhe33IbTgs3lVmx7rHXWsIFfTvKtNlrQ=(#=q__0aJnzE_j5V$E$xqdkd8PUPKgwbochaYTDqzGbXfa0=)
#=qjg$mq9k6hZwR1eaAS3eQ4dux$3oD_j8CRZte$f$nFV0=:#=qIPn628V9gmXGKu9CDwAT4Q==(#=q__0aJnzE_j5V$E$xqdkd8PUPKgwbochaYTDqzGbXfa0=)
#=qxj6gmeF_JmZ38rfyBJuqFoiB_sAo6WCf4j1AdQtxGgQ=:#=qpnen9BDYWb7GIHNeIDM0B2w3_bWY6Y1K7n6fbysAk2U=(#=q__0aJnzE_j5V$E$xqdkd8PUPKgwbochaYTDqzGbXfa0=)
#=qxj6gmeF_JmZ38rfyBJuqFoiB_sAo6WCf4j1AdQtxGgQ=:#=qnjPTIXsYLyWun9DHM4QyDdSqTLT$sNaH7rGgebuLUF8=(#=qDyYck6jY0p_qh6doTcsvIbN8t3TKJHLMicx6djrzRdg=, #=qRMLBZ3x0t2lxzonCDm0Cfm2prwqhhrFrdWTAeD6z7q8=, #=qBQZKBBBvB7$YPJYYJ6uGmZupKsyCo6fust8CQG8ZrYc=)
#=qxj6gmeF_JmZ38rfyBJuqFoiB_sAo6WCf4j1AdQtxGgQ=:#=q9Ox7MeTma6fxAsTig99GV6twoS8KYKSkq98q3ldn1AU=()
#=qxj6gmeF_JmZ38rfyBJuqFoiB_sAo6WCf4j1AdQtxGgQ=:#=qdSwDnRo$f5EQslih94YkOg==()
#=qjg$mq9k6hZwR1eaAS3eQ4dux$3oD_j8CRZte$f$nFV0=:#=qqJfJJIU5OocEzCry9eP0ew==()
#=qSBVG6i3HoKQx$z3bwADYIgVX_kCktQP8JwBh1CI$O_8=:#=qK4rBLHQlJi1c$9ISNO6Z6w==()
uLink.InternalHelper:LateUpdate()

(Filename: Line: -1)
 

Jakkee

Plugin Developer
Plugin Developer
Contributor
Jul 28, 2014
1,463
284
83
Australia
cool addon .. i cnt get it to work and i seem to be getting this

NullReferenceException: Object reference not set to an instance of an object
NullReferenceException: Object reference not set to an instance of an object
at IronPython.Runtime.Operations.PythonOps.MakeString (System.Collections.Generic.IList`1<byte>) <0x0000f>
at IronPython.Runtime.Operations.DoubleOps.__new__ (IronPython.Runtime.CodeContext,IronPython.Runtime.Types.PythonType,System.Collections.Generic.IList`1<byte>) <0x000b3>
at (wrapper dynamic-method) object.CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,IronPython.Runtime.CodeContext,object,object) <0x00100>
at System.Dynamic.UpdateDelegates.UpdateAndExecute3<IronPython.Runtime.CodeContext, object, object, object> (System.Runtime.CompilerServices.CallSite,IronPython.Runtime.CodeContext,object,object) <0x003a4>
at (wrapper delegate-invoke) Microsoft.Scripting.Utils.Func`6<System.Func`5<System.Runtime.CompilerServices.CallSite, IronPython.Runtime.CodeContext, object, object, object>, System.Runtime.CompilerServices.CallSite, IronPython.Runtime.CodeContext, object, object, object>.invoke_object__this___Func`5<CallSite, CodeContext, object, object, object>_CallSite_CodeContext_object_object (System.Func`5<System.Runtime.CompilerServices.CallSite, IronPython.Runtime.CodeContext, object, object, object>,System.Runtime.CompilerServices.CallSite,IronPython.Runtime.CodeContext,object,object) <0x0006c>
at Microsoft.Scripting.Interpreter.FuncCallInstruction`6<System.Func`5<System.Runtime.CompilerServices.CallSite, IronPython.Runtime.CodeContext, object, object, object>, System.Runtime.CompilerServices.CallSite, IronPython.Runtime.CodeContext, object, object, object>.Run (Microsoft.Scripting.Interpreter.InterpretedFrame) <0x00181>
at Microsoft.Scripting.Interpreter.Interpreter.Run (Microsoft.Scripting.Interpreter.InterpretedFrame) <0x0007a>

UnityEngine.Debug:Internal_LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception, Object)
Fougerite.Logger:LogException(Exception, Object)
IronPythonModule.IPPlugin:Invoke(String, Object[])
IronPythonModule.IPPlugin:OnEntityDeployed(Player, Entity)
Fougerite.Hooks:EntityDeployed(Object)
StructureComponentDataBlock:DoAction1(BitStream, ItemRepresentation, NetworkMessageInfo&)
ItemRepresentation:RunAction(Int32, BitStream, NetworkMessageInfo&)
ItemRepresentation:RunServerAction(Int32, BitStream, NetworkMessageInfo&)
ItemRepresentation:Action1(BitStream, NetworkMessageInfo)
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
#=qaL2AMBCaBLCj4lGSCwjcBVYUs_5vzeQVgu44HVklVYQ=:#=qG_E6hqIvz6NLWQQCT2N5IA==(Object, Object[])
#=q$NUWz6aT_ypN3cz7K6ce2gVWapiYAlnLPGzKjIUfT2w=:#=qS9ntZNSJqwnPkZv_HZvsug==(BitStream, Object)
uLink.NetworkView:OnRPC(String, BitStream, NetworkMessageInfo)
uLink.NetworkViewBase:#=qpJfiNEhSKsosBj54zW21Bw==(String, BitStream, NetworkMessageInfo)
#=qjg$mq9k6hZwR1eaAS3eQ4dux$3oD_j8CRZte$f$nFV0=:#=qlGEZiB55BOeKhe33IbTgs3lVmx7rHXWsIFfTvKtNlrQ=(#=q__0aJnzE_j5V$E$xqdkd8PUPKgwbochaYTDqzGbXfa0=)
#=qjg$mq9k6hZwR1eaAS3eQ4dux$3oD_j8CRZte$f$nFV0=:#=qIPn628V9gmXGKu9CDwAT4Q==(#=q__0aJnzE_j5V$E$xqdkd8PUPKgwbochaYTDqzGbXfa0=)
#=qxj6gmeF_JmZ38rfyBJuqFoiB_sAo6WCf4j1AdQtxGgQ=:#=qpnen9BDYWb7GIHNeIDM0B2w3_bWY6Y1K7n6fbysAk2U=(#=q__0aJnzE_j5V$E$xqdkd8PUPKgwbochaYTDqzGbXfa0=)
#=qxj6gmeF_JmZ38rfyBJuqFoiB_sAo6WCf4j1AdQtxGgQ=:#=qnjPTIXsYLyWun9DHM4QyDdSqTLT$sNaH7rGgebuLUF8=(#=qDyYck6jY0p_qh6doTcsvIbN8t3TKJHLMicx6djrzRdg=, #=qRMLBZ3x0t2lxzonCDm0Cfm2prwqhhrFrdWTAeD6z7q8=, #=qBQZKBBBvB7$YPJYYJ6uGmZupKsyCo6fust8CQG8ZrYc=)
#=qxj6gmeF_JmZ38rfyBJuqFoiB_sAo6WCf4j1AdQtxGgQ=:#=q9Ox7MeTma6fxAsTig99GV6twoS8KYKSkq98q3ldn1AU=()
#=qxj6gmeF_JmZ38rfyBJuqFoiB_sAo6WCf4j1AdQtxGgQ=:#=qdSwDnRo$f5EQslih94YkOg==()
#=qjg$mq9k6hZwR1eaAS3eQ4dux$3oD_j8CRZte$f$nFV0=:#=qqJfJJIU5OocEzCry9eP0ew==()
#=qSBVG6i3HoKQx$z3bwADYIgVX_kCktQP8JwBh1CI$O_8=:#=qK4rBLHQlJi1c$9ISNO6Z6w==()
uLink.InternalHelper:LateUpdate()

(Filename: Line: -1)
Ignore NullReference, Also does the plugin work while getting that big o' error?
 

maughanorama

Member
Member
Nov 27, 2014
181
10
18
43
Na I'm unable to get it to work.... I'm out at the mo Ill ttry again in a bit from fresh reload
 

Jakkee

Plugin Developer
Plugin Developer
Contributor
Jul 28, 2014
1,463
284
83
Australia
Na I'm unable to get it to work.... I'm out at the mo Ill ttry again in a bit from fresh reload
I'll have a play around see if i can get that error, Do you know how you got it?
I know NullReference is when destroying an object
 

ammaz

Member
Member
Jan 16, 2015
40
10
8
27
Pakistan,Karachi
www.facebook.com
I am getting this error.
Error in plugin BuildingRestriction:
Traceback (most recent call last):
File "<string>", line 78, in On_EntityDeployed
TypeError: Multiple targets could match: int(type, IList[Byte]), int(type, objec
t), int(type, Extensible[float])

Error in plugin BuildingRestriction:
Traceback (most recent call last):
File "<string>", line 58, in On_EntityDeployed
TypeError: Multiple targets could match: int(type, IList[Byte]), int(type, objec
t), int(type, Extensible[float])
 

Leonardo

New Member
Member
Sep 5, 2015
20
2
3
38
Hey, You could add the next updates a limit of objects that can be placed by each player?
 
  • Informative
Reactions: Jakkee

LaIkIuX 2

Member
Member
Dec 26, 2016
35
0
6
31
Lithuania
What is wrong with height base limit after player disconect other friend can build unlimit height base?
Server has DestroySystem plugin, rust++ module
 
Last edited:

Jakkee

Plugin Developer
Plugin Developer
Contributor
Jul 28, 2014
1,463
284
83
Australia
What is wrong with height base limit after player disconect other friend can build unlimit height base?
Server has DestroySystem plugin, rust++ module
Plugin doesn't check player/s. Can't see why that would happen.
On each placement it will check if it is within the max height and/or max foundations
 

gintaras

Plugin Developer
Plugin Developer
Jan 10, 2017
68
11
8
What is wrong with height base limit after player disconect other friend can build unlimit height base?
Server has DestroySystem plugin, rust++ module
Yeap this is bug when player is offline there no where to sendback piller or fundation
 

gintaras

Plugin Developer
Plugin Developer
Jan 10, 2017
68
11
8
if height < Entity.Y - ent.Y:
try:
Player.Inventory.AddItem("Wood Pillar", 1)
Player.InventoryNotice("1 x " + Entity.Name)
Entity.Destroy()
Player.Message("Max build height reached for this base [ " + str(PluginSettings["Max WoodHeight"] / 4) + " units tall ]")
except:
break
break
else:
continue

its try player.inv but structure dont belong to player who builds so its get to exception
I dont programing in PY but this may help to fix

try:
Player.Inventory.AddItem("Wood Pillar", 1)
Player.InventoryNotice("1 x " + Entity.Name)
Entity.Destroy()
Player.Message("Max build height reached for this base [ " + str(PluginSettings["Max WoodHeight"] / 4) + " units tall ]")
except:
Entity.Destroy()
break
break
 

salva

Friendly self-taught developer
Administrator
Jan 31, 2016
576
164
43
1.0.3

[IronPython] Error in plugin BuildingRestriction:
Traceback (most recent call last):
File "<string>", line 106, in On_EntityDeployed