I've done the Authorize part which was kinda easy.. but I cant get to work the Clear Everyone & Deauthorize
What I've tried for the Deauthorize
(I've tried many other ways but these two are I think the closest..)
About the p.authorizedPlayers.Clear();Code:List<BuildingPrivlidge> cbp = buildingPrivlidges.GetValue(player) as List<BuildingPrivlidge>; foreach (BuildingPrivlidge p in cbp) { p.authorizedPlayers.RemoveAll(new Predicate<ProtoBuf.PlayerNameID>(player.userID)); //or p.authorizedPlayers.Remove(player.userID); }
What I want exactly is to clear all the authorized players(friends) from all the cupboard that I own.
Well it worked but my code was clearing the authorized players(friends) from the cupboard that I'm currently in range.
For the p.authorizedPlayers.Add it works as I want.. it authorizes my friends to all the cupboards that I own. However with the same code and just replacing the Add(......) with .Clear() it's not the same.
Thanks for any help,
PaiN
Clearing/deauthoring cupboard
Discussion in 'Rust Development' started by PaiN, May 27, 2016.
