0
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
2 Respuestas
0
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
0
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
}