how do I go about getting the list of authed users from a TC and checking that the Owner is still authed on the TC?
Checking if tool cupboard owner is author?
Discussion in 'Rust Development' started by Dubz, Feb 14, 2017.
-
Wulf Community Admin
I don't think tool cupboards have any concept of owners, just authorized users.
-
So they don't have an id that identify's the person who placed the entity?
-
Wulf Community Admin
-
Code:
void Example(BuildingPrivlidge cupboard) { ulong ownerId = cupboard.OwnerID; // The ID of the player who placed the cupboard // cupboard.authorizedPlayers is the auth list, each entry contains 3 variables of which 2 will be of use to you, userid (ulong) and username (string) // If you want say all the userIds then you could do something like this var authList = cupboard.authorizedPlayers.Select(x => x.userid).ToArray(); }