1. Trying to get a count of tool cupboards that the player is affected by whether blocked on unblocked.

    Using C# if anyone could point me in the right direction it would be great.
     
  2. The cupboard count a player is authorized on.

    untested code:
    playerID = player.userID; //player you're looking for

    Code:
    int cnt = 0;           
                foreach (BuildingPrivlidge bldpriv in UnityEngine.Resources.FindObjectsOfTypeAll<BuildingPrivlidge>())
                {
                    if (bldpriv is BuildingPrivlidge)
                    {
                        BuildingPrivlidge priv = (BuildingPrivlidge)bldpriv;                   
                        // Loop through cupboards 
                        foreach (ProtoBuf.PlayerNameID plnid in priv.authorizedPlayers.ToList())
                        {   
                            // If the player is found
                            if (plnid.userid == playerID)
                            {                           
                                cnt++;
                            }                           
                        }                   
                    }
                }
     
  3. I keep running into the Protobuf.PlayernameID, but I always seem to encounter and error with it.

    "The namespace PlayerNameID does not exist in the namespace Protobuf (are you missing an assembly reference?)"

    Could you point me towards the correct reference material? I'm currently referencing the protobuf-net.dll
    Something tells me that's not right as I would need to call values from Oxide with it.