1. Didn't work with rocks totally. Will be an update of that plugin?
     
  2. delete
     
    Last edited by a moderator: Sep 1, 2015
  3. Hey the plugin dont do what he should do... everyone can build on rocks and and and... pls update the plugin and please make Blocks for Icebergs :)
    ciao
     
  4. Please Uptade
     
  5. New version!

    Fixed all bugs.
    Fixed building block in rock, on rock, sphere.
    Add config var: block on iceberg.
    Removed: Under Terrain.
    Fixed foundation.steps name.

    Need create new config!

    Code:
    using UnityEngine;
    using System;namespace Oxide.Plugins
    {
        [Info("BuildBlocker", "Bombardir", "1.3.5", ResourceId = 834)]
        class BuildBlocker : RustPlugin
        {
            #region Config        static bool OnIceberg = false;
            static bool OnRoad = false;
            static bool OnRiver = false;
            static bool OnRock = true;
            static bool InTunnel = true;
            static bool InRock = false;
            static bool InCave = true;
            static bool InWarehouse = true;
            static bool InMetalBuilding = true;
            static bool InHangar = true;
            static bool InTank = true;
            static bool InBase = true;
            static bool InStormDrain = false;
            static bool UnBridge = false;
            static bool UnRadio = false;
            static bool BlockStructuresHeight = false;
            static bool BlockDeployablesHeight = false;
            static int MaxHeight = 100;
            static bool BlockStructuresWater = false;
            static bool BlockDeployablesWater = false;
            static int MaxWater = -2;
            static int AuthLVL = 2;
            static string Msg = "Hey! You can't build here!";
            static string MsgHeight = "You can't build here! (Height limit 100m)";
            static string MsgWater = "You can't build here! (Water limit -2m)";        void LoadDefaultConfig() { }        void CheckCfg<T>(string Key, ref T var)
            {
                if (Config[Key] is T)
                    var = (T)Config[Key];
                else
                    Config[Key] = var;
            }        void Init()
            {
                CheckCfg<bool>("Block On Iceberg", ref OnIceberg);
                CheckCfg<bool>("Block On Roads", ref OnRoad);
                CheckCfg<bool>("Block On Rivers", ref OnRiver);
                CheckCfg<bool>("Block On Rock", ref OnRock);
                CheckCfg<bool>("Block In Rock", ref InRock);
                CheckCfg<bool>("Block In Rock Cave", ref InCave);
                CheckCfg<bool>("Block In Storm Drain", ref InStormDrain);
                CheckCfg<bool>("Block In Tunnel", ref InTunnel);
                CheckCfg<bool>("Block In Base", ref InBase);
                CheckCfg<bool>("Block In Warehouse", ref InWarehouse);
                CheckCfg<bool>("Block In Metal Building", ref InMetalBuilding);
                CheckCfg<bool>("Block In Hangar", ref InHangar);
                CheckCfg<bool>("Block Under|On Metal Sphere", ref InTank);
                CheckCfg<bool>("Block Under|On Bridge", ref UnBridge);
                CheckCfg<bool>("Block Under|On Radar", ref UnRadio);
                CheckCfg<int>("Max Height Limit", ref MaxHeight);
                CheckCfg<bool>("Block Structures above the max height", ref BlockStructuresHeight);
                CheckCfg<bool>("Block Deployables above the max height", ref BlockDeployablesHeight);
                CheckCfg<int>("Max Under Water Height Limit", ref MaxWater);
                CheckCfg<bool>("Block Structures under water", ref BlockStructuresWater);
                CheckCfg<bool>("Block Deployables under water", ref BlockDeployablesWater);
                CheckCfg<string>("Block Water Message", ref MsgWater);
                CheckCfg<string>("Block Height Message", ref MsgHeight);
                CheckCfg<string>("Block Message", ref Msg);
                CheckCfg<int>("Ignore Auth Lvl", ref AuthLVL);
                SaveConfig();
            }
            #endregion        #region Logic        void CheckBlock(BaseNetworkable StartBlock, BasePlayer sender, bool CheckHeight, bool CheckWater)
            {
                if (StartBlock && sender.net.connection.authLevel < AuthLVL && !StartBlock.isDestroyed)
                {
                    Vector3 Pos = StartBlock.transform.position;
                    if (StartBlock.name.Contains("foundation.steps"))
                        Pos.y += 1.3f;                if (CheckHeight || CheckWater)
                    {
                        float height = TerrainMeta.HeightMap.GetHeight(Pos);
                        if (CheckHeight && Pos.y - height > MaxHeight)
                        {
                            sender.ChatMessage(MsgHeight);
                            StartBlock.Kill(BaseNetworkable.DestroyMode.Gib);
                            return;
                        }
                        else if (CheckWater && height < 0 && height < MaxWater && Pos.y < 2.8f )
                        {
                            sender.ChatMessage(MsgWater);
                            StartBlock.Kill(BaseNetworkable.DestroyMode.Gib);
                            return;
                        }
                    }                Pos.y += 200;
                    RaycastHit[] hits = Physics.RaycastAll(Pos, Vector3.down, 202.8f);
                    Pos.y -= 200;                for (int i = 0; i < hits.Length; i++)
                    {
                        RaycastHit hit = hits[i];
                        if (hit.collider)
                        {
                            string ColName = hit.collider.name;
                         
                            if (InBase && ColName.StartsWith("base", StringComparison.CurrentCultureIgnoreCase) ||
                                InMetalBuilding && ColName == "Metal_building_COL" ||
                                UnBridge && ColName == "Bridge_top" ||
                                UnRadio && ColName.StartsWith("dish") ||
                                InWarehouse && ColName.StartsWith("Warehouse") ||
                                InHangar && ColName.StartsWith("Hangar") ||
                                OnRiver && ColName == "rivers" ||
                                InTunnel && ColName.Contains("unnel") ||
                                OnIceberg && ColName == "iceberg_COL" ||
                                OnRoad && ColName.EndsWith("road", StringComparison.CurrentCultureIgnoreCase) ||
                                InStormDrain && ColName.StartsWith("Storm_drain", StringComparison.CurrentCultureIgnoreCase) ||
                                InTank && ColName.Contains("sphere") ||
                                (ColName.StartsWith("rock", StringComparison.CurrentCultureIgnoreCase) ||
                                ColName.StartsWith("cliff", StringComparison.CurrentCultureIgnoreCase) ||
                                ColName == "Mesh") &&
                                (hit.point.y < Pos.y ? OnRock : hit.collider.bounds.Contains(Pos) ? InRock : InCave))
                            {
                                sender.ChatMessage(Msg);
                                StartBlock.Kill(BaseNetworkable.DestroyMode.Gib);
                                break;
                            }
                        }
                    }
                }
            }        #endregion        #region Hooks        void OnEntityBuilt(Planner plan, GameObject obj) => CheckBlock(obj.GetComponent<BaseNetworkable>(), plan.ownerPlayer, BlockStructuresHeight, BlockStructuresWater);        void OnItemDeployed(Deployer deployer, BaseEntity deployedentity)
            {
                if (!(deployedentity is BaseLock))
                    CheckBlock((BaseNetworkable) deployedentity, deployer.ownerPlayer, BlockDeployablesHeight, BlockDeployablesWater);
            }        #endregion
        }
    }
    Test this =)
     
    Last edited by a moderator: Sep 19, 2015
  6. sorry man , but i am not sure i understand what you want me to do . do i just put the new config in place of the old one of keep and make a second one do i need a new json :S
     
  7. Just search in the plugin for Chat Handle and change Russian to English. Thanks man great work
     
    Last edited by a moderator: Oct 13, 2015
  8. Thanks for your great job, man =)
     
  9. Still having Rock Houses with this. Hope to see a future update sometime.
     
  10. Would love a fix also to stop building in rocks :(

    Would prefer if a player went inside (not on, or in a cave) a rock that they be teleported out.
     
  11. Can someone please update this? Inside of rocks and iceberg bases suck..
     
  12. @Bombardir
    I got told by some players of my server that they get the message
    Hey! You can't build here!

    Although they are just trying to rebuild a hole in their high external stone wall.
    There is nothing from the env that could trigger BuildBlocker like rocks etc.

    Config we run
    Code:
    "Block In Base": true,
      "Block In Hangar": true,
      "Block In Metal Building": true,
      "Block In Rock": true,
      "Block In Rock Cave": true,
      "Block In Storm Drain": false,
      "Block In Tunnel": true,
      "Block In Warehouse": true,
      "Block Message": "Hey! You can't build here!",
      "Block On Rivers": false,
      "Block On Roads": true,
      "Block On Rock": false,
      "Block Structures above the max height": false,
      "Block Structures under water": true,
      "Block Under Terrain": false,
      "Block Under|On Bridge": true,
      "Block Under|On Metal Sphere": true,
      "Block Under|On Radar": true,
     
  13. This plugin hasn't been updated in ages and most likely isn't working properly.
     
  14. Would there be another way to prevent players building on roads etc if this isn't updated
     
  15. Not that I'm aware of we use to use this on our server but it stopped working right on rocks etc. so we removed it. We haven't found a replacement since. :/
     
  16. Well for me it works on most locations obviously not if I try to place stuff since I have auth level 2
     
  17. Yeah for sure, core things like auth level will work but but stuff like terrain mesh's etc have changed A LOT since this plugin was last updated. My best guess is the plugin is having a hard time recognizing parts of the terrain due to procgen updates etc. So it's acting funky. I'm no expert but I just think it needs to be updated, unfortunately. :(
     
  18. hmm we need a new update for this, need to block, rock houses