Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: Darkblizzard on May 21, 2014, 06:44:49 PM

Title: ULX Ranks Authority
Post by: Darkblizzard on May 21, 2014, 06:44:49 PM
Hello,
I wanted to know if anyone knew how to not allow the lower ranks use commands (Tp, Goto, Kick/Ban, Freeze etc.) on higher ranks.
My Rank Order (Greatest to Least):
Owner
HeadAdministrator
Administrator
NewAdministrator
Moderator

Note: The ranks superadmin, admin, operator, user are inside still, I just don't use the default ranks.
Title: Re: ULX Ranks Authority
Post by: Avoid on May 21, 2014, 06:52:28 PM
Hello there,
You should use can_target for that.

For example, take a look at the very first lines of my admin group:
Code: [Select]
"admin"
{
        "can_target"    "!%superadmin"

Also, have a look at this useful link concerning can_target: Click here (http://forums.ulyssesmod.net/index.php/topic,5346.0.html)

Kind regards,
Avoid
Title: Re: ULX Ranks Authority
Post by: Darkblizzard on May 21, 2014, 06:58:58 PM
So I have to edit it through the files? Such as:

Code: [Select]
"Owner"
{
        "can_target"    "*"

"HeadAdministrator"
{
        "can_target"    "!%Owner"
Title: Re: ULX Ranks Authority
Post by: MrPresident on May 21, 2014, 07:52:04 PM
You should be able to do this through XGUI, or at the very least through your console.

It is not recommended to edit the files manually as making even the smallest syntax error will cause lots of problems.
Title: Re: ULX Ranks Authority
Post by: Darkblizzard on May 21, 2014, 08:13:52 PM
Okay, but how should the Inheritance be setup? Mod through Head Admin inherit from the default admin.
Title: Re: ULX Ranks Authority
Post by: MrPresident on May 21, 2014, 08:46:28 PM
Yes, if you want IsAdmin checks to work on other admin groups, they will need to inherit from admin.

Please also make sure your Owner group is superadmin. You can name it Owner using your gamemode's teams or uTeam built into XGUI if you are running a Sandbox derived gamemode.
Title: Re: ULX Ranks Authority
Post by: Darkblizzard on May 22, 2014, 03:29:50 AM
And if you don't want them to work on other groups?
Title: Re: ULX Ranks Authority
Post by: Decicus on May 22, 2014, 03:42:07 AM
And if you don't want them to work on other groups?
Inherit from "user".
Title: Re: ULX Ranks Authority
Post by: Darkblizzard on May 22, 2014, 06:46:02 AM
Okay so when I set the ranks to inherit from user then I can make the ranks for the Can target be "!%Moderator" etc.?
Title: Re: ULX Ranks Authority
Post by: Decicus on May 22, 2014, 07:17:15 AM
Okay so when I set the ranks to inherit from user then I can make the ranks for the Can target be "!%Moderator" etc.?
Yes, "!%moderator" will allow to not target anyone that inherits from 'moderator' (or inherits from a group that inherits from moderator). Remember that if groups don't inherit from moderator (indirectly or directly), then using only "!%moderator" will allow those groups to be targetted.
Title: Re: ULX Ranks Authority
Post by: Darkblizzard on May 22, 2014, 05:29:07 PM
Okay so what your saying I should do is for the ranks:
Code: [Select]
HeadAdministrator
Administrator
NewAdministrator
Moderator
I change their inheritance to User but keep Owner to inherit super-admin? Then after doing so make it so that the rank Moderator have "!%NewAdministrator", New Administrator to have "!%Administrator" and so on, correct?
Title: Re: ULX Ranks Authority
Post by: Decicus on May 22, 2014, 10:29:20 PM
Yes, but then superadmin will have to inherit "headadministrator", or else you will create multiple inheritance trees, which will "break" the can_target.

I also advise you to change the group names to be lowercase, since things tend to break with capital letters in group names.