Please Help with Admin

Hey anyone i want to know how to add Admin permissions into a game for example when someone owns something that onlythey access but admins are able access it as well

22nd Feb 2017, 4:13 AM
Michael Santos
Michael Santos - avatar
2 Answers
add them to a "owner" vector of each item. each item would have an "owner" vector with the name of the player that owns it and all the admins, and when you want to do something with the item tue game checks ifcyu are in the owner vector for the item
22nd Feb 2017, 4:24 AM
Seckar - avatar
you can deploy Role Concept that have some Relation with Users. so you have a Role with name of "Admin" and any user that have this role can access to any thing in your program. look at this: //Check Accessibility to somethings if(AuthenticatedUser.Role == Enums.Roles.Admin) { //Access to object } else if(FunctionThatCheckAccesibility() == true) { //Access to object }
22nd Feb 2017, 7:48 AM
Seyed Arman Fatemi
Seyed Arman Fatemi - avatar