Hey Guys,
On my PvP People would like to have Elevator Blocking
Hope People know what i mean.
U place a Block Jump Block Jump Block Jump the normal way to build up for a raid... can we stop this somehow?
Solved Block elevator blocks
Discussion in 'Plugin Requests' started by CHR, Mar 2, 2015.
-
No possability?
It's fine to build diving boards I just wanna delay the time they need to build up. Come on guys. -
Might add this as a plugin later but I haven't been able to test this on a live server so I have no idea how it will go on an active server, basically what it does is blocking the player from building anything while he is jumping or when the player is too close to the build location.
Attached Files:
-
-
AMAZING i Try it out and tell u how ist going
[DOUBLEPOST=1425918713,1425909535][/DOUBLEPOST]U must release it as a official Plugin it works Perfect -
I totally forgot about this to be honest
I have added it to the resources and should appear there once it has been approved. -
yes it should be publish several months ago
it's really perfect man
already 16player left my server but doesnt matter! -
It just delays the build of towers. But it works.
-
Are you able to extend this by denying building on top of other people? This can still be done as a two man job, although they won't be able to build -that- far up.
-
-
BlockBlockElevators.cs
Code:// Reference: Oxide.Ext.Rustusing System.Collections.Generic; using System; using System.Reflection; using System.Data; using UnityEngine; using Oxide.Core;namespace Oxide.Plugins { [Info("BlockBlockElevators", "Reneb", "1.0.0")] class BlockBlockElevators : RustPlugin { BuildingBlock cachedBlock; TriggerBase cachedTrigger; BasePlayer cachedPlayer; int playerMask; int blockLayer; int triggerLayer; bool hasStarted = false; void OnServerInitialized() { hasStarted = true; playerMask = LayerMask.GetMask(new string[] { "Player (Server)" }); triggerLayer = UnityEngine.LayerMask.NameToLayer("Trigger"); blockLayer = UnityEngine.LayerMask.NameToLayer("Construction"); } void OnEntityBuilt(Planner planner, GameObject gameObject) { cachedBlock = gameObject.GetComponent<BuildingBlock>(); if (cachedBlock == null) return; if (cachedBlock.blockDefinition == null) return; if (cachedBlock.blockDefinition.fullName != "build/block.halfheight") return; cachedBlock.GetComponentInChildren<MeshCollider>().gameObject.AddComponent<TriggerBase>(); cachedBlock.GetComponentInChildren<TriggerBase>().gameObject.layer = triggerLayer; cachedBlock.GetComponentInChildren<TriggerBase>().interestLayers = playerMask; timer.Once(0.1f, () => ResetBlock(cachedBlock) ); } void ResetBlock(BuildingBlock block) { if (block == null) return; GameObject.Destroy(block.GetComponentInChildren<TriggerBase>()); block.gameObject.layer = blockLayer; } void OnEntityEnter(TriggerBase triggerbase, BaseEntity entity) { if (!hasStarted) return; cachedBlock = triggerbase.GetComponentInParent<BuildingBlock>(); if (cachedBlock == null) return; if (cachedBlock.blockDefinition.fullName != "build/block.halfheight") return; cachedPlayer = entity.GetComponent<BasePlayer>(); if (cachedPlayer == null) return; cachedBlock.KillMessage(); cachedPlayer.SendConsoleCommand("chat.add", new object[] { "0", string.Format("<color=orange>{0}:</color> {1}", "Warning", "You are not allowed to build blocks over you"), 1.0 }); } } }
-
I think this is seperate plugin which need to be installed additionally
-
Is it possible for someone to make a plugin that destroys twig objects placed on top of other twig objects? This will fix a lot of the elevator abuse.