1. Last edited by a moderator: Mar 19, 2017
  2. I wonder if this will work ?? I cooked it up, but unable to test atm.

    Moderator edit: removed broken code. If sharing full plugins, please test and use the Plugins section once usable.
     
    Last edited by a moderator: Mar 21, 2017
  3. Wulf

    Wulf Community Admin

    Nope, you're missing some key plugin elements for it to initialize, as well as some code errors. I'd suggest setting up a server to test with.
     
  4. Haha, it was off head, I didn't compile it, and didn't fully add the plugin essential "elements"
     
    Last edited by a moderator: Mar 21, 2017
  5. Essentially this would be a good way to start.
    Code:
    private void OnEntitySpawned(BaseNetworkable ent)
    {
        if (ent is BuildingPrivlidge)
        {
                BuildingPrivlidge priv = (ent as BuildingPrivlidge);
                BasePlayer pl = BasePlayer.FindById(priv.OwnerId);
                priv.authorizedPlayers.Add(new ProtoBuf.PlayerNameID { userid = pl.userID, username = pl.displayName, ShouldPool = true });
                priv.SendNetworkUpdateImmediate();
        }
    }
    At Least haven't had any issues
     
  6. I was close lol, not :/

    I didn't know onEntitySpawn was when something was placed.
     
  7. It's every time a entity is created in the world