ULX help: "Moderators" can target Super Admins/how to set up the ranks.

Right, so I always have trouble with setting up my ranks.

How do I set up a tiered rank system?

> superadmin
> admin
> Moderator
> Helper

Right now I have Moderator inheriting from “user” and the ‘can target’ is set to !%Moderator and they can’t target each other, but can target superadmins.

I’m guessing it should inherit from admin instead. But then the Moderator rank has access to a bunch of admin commands by default that I can’t untick. Not sure what to Google, so any help would be appreciated :slight_smile:

So essentially what happens is, every rank has to inherit from the rank below it in the chain, and then the !% has to be set to the rank above it, if you don’t want them to target anybody higher.

So for example if you had

superadmin
admin
mod

it would be

superadmin inherits from admin, can target * (everyone)
admin inherits from mod, can target !%superadmin
mod inherits from user, can target !%admin

The reason why mod has a lot of shit you can’t untick is because it’s inheriting from a rank with all those commands, so fix inheritance and that should work

And if you do not feel like doing it all by the GUI…

\SERVER\garrysmod\data\ulib\groups.txt



"superadmin"	
{
	"can_target"	"*"
	"allow"	
	{
	"*"	
	}
	"inherit_from"	"admin"
}


"admin"	
{
	"can_target"	"!%superadmin"
	"allow"	
	{
		
	}
	"inherit_from"	"Moderator"
}


"Moderator"	
{
	"can_target"	"!%admin"
	"allow"	
	{
		
	}
	"inherit_from"	"Helper"
}


"Helper"	
{
	"can_target"	"!%Moderator"
	"allow"	
	{
		
	}
	"inherit_from"	"user"
}


And then you can use the GUI to set the permissions up. Be sure you are in console to promote or OP yourself to add all the permissions to the groups.
If you cannot get into the console window or have issues with a conflicting addon to add yourself to OP, then just go to…

\SERVER\garrysmod\data\ulib\users.txt



"STEAM_ID"	
{
	"deny"	
	{
	}
	"allow"	
	{
	}
	"name"	"steam name here"
	"group"	"superadmin"
}


Then reload the server.