Author Topic: ULX Ranks Authority  (Read 3159 times)

0 Members and 1 Guest are viewing this topic.

Offline Darkblizzard

  • Newbie
  • *
  • Posts: 39
  • Karma: 1
ULX Ranks Authority
« 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.

Offline Avoid

  • Full Member
  • ***
  • Posts: 142
  • Karma: 42
Re: ULX Ranks Authority
« Reply #1 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

Kind regards,
Avoid

Offline Darkblizzard

  • Newbie
  • *
  • Posts: 39
  • Karma: 1
Re: ULX Ranks Authority
« Reply #2 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"

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: ULX Ranks Authority
« Reply #3 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.

Offline Darkblizzard

  • Newbie
  • *
  • Posts: 39
  • Karma: 1
Re: ULX Ranks Authority
« Reply #4 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.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: ULX Ranks Authority
« Reply #5 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.

Offline Darkblizzard

  • Newbie
  • *
  • Posts: 39
  • Karma: 1
Re: ULX Ranks Authority
« Reply #6 on: May 22, 2014, 03:29:50 AM »
And if you don't want them to work on other groups?

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: ULX Ranks Authority
« Reply #7 on: May 22, 2014, 03:42:07 AM »
And if you don't want them to work on other groups?
Inherit from "user".
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline Darkblizzard

  • Newbie
  • *
  • Posts: 39
  • Karma: 1
Re: ULX Ranks Authority
« Reply #8 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.?

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: ULX Ranks Authority
« Reply #9 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.
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline Darkblizzard

  • Newbie
  • *
  • Posts: 39
  • Karma: 1
Re: ULX Ranks Authority
« Reply #10 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?

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: ULX Ranks Authority
« Reply #11 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.
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.