1. Hi guys. To check that player within the building. I use:
    Code:
    buildingPrivlidges = typeof(BasePlayer).GetField("buildingPrivlidges", (BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance | BindingFlags.NonPublic));
    List<BuildingPrivlidge> playerpriv = buildingPrivlidges.GetValue(player) as List<BuildingPrivlidge>;
    if (playerpriv.Count == 0)
    How to check the other objects?
     
  2. you can look at my zone manager, i use a lot this.
     
  3. Code:
    bool findCupboard = false;
    foreach(Collider col in Physics.OverlapSphere(entity.transform.position, 30))
    {
        if(col.name == "items/cupboard.tool.deployed")
        {
            findCupboard = true;
            break;
        }
    }
    
    This code can be optimized? I do not understand how to work with masks and what they do.

    Sorry for my bad English ...