1. Can someone point me how to block bulding at entire map?
     
  2. Wulf

    Wulf Community Admin

    Use the CanBuild hook, just return false.
     
  3. U mean somthing like this:

    Code:
        public object  example(Planner plan, Construction prefab)
            {
                return false;
            }
            void CanBuild(Planner plan, Construction prefab)
            {
                example( plan, prefab);
                Puts("Blocked"); 
               
            }
     
  4. Wulf

    Wulf Community Admin

    If you want to outright block it no matter what, this is all you need:
    Code:
    bool CanBuild() => false;
    The above code is shorthand of:
    Code:
    bool CanBuild()
    {
        return false;
    }
    Since you aren't using any arguments, you don't need to include them.

    If you want to send a message to the player trying to build:
    Code:
    bool CanBuild(Planner plan)
    {
        var player = plan.GetOwnerPlayer();
        PrintToChat(player, "Building blocked!");
        return false;
    }