Author Topic: ulx can target  (Read 24526 times)

0 Members and 1 Guest are viewing this topic.

Offline tzahush

  • Newbie
  • *
  • Posts: 17
  • Karma: 1
ulx can target
« on: April 19, 2014, 03:51:56 AM »
hey guys, i got about 5 ranks on my server.
user
moderator
admin
senioradmin
supervisor
superadmin
How do i make that moderator can target user, but cant target mod admin senioradmin supervisor and superadmin.
And then admin, can target mod + user, but cant targer senioradmin supervisor and superadmin..
And you got the point.
How do i put it in the syntax?

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: ulx can target
« Reply #1 on: April 19, 2014, 03:55:31 AM »
user = *
moderator = !%admin
admin = !%senioradmin
senioradmin = !%supervisor
supervisor = !%superadmin
superadmin = *
Out of the Garry's Mod business.

Offline tzahush

  • Newbie
  • *
  • Posts: 17
  • Karma: 1
Re: ulx can target
« Reply #2 on: April 19, 2014, 04:00:29 AM »
and will this actully work?
will it recognise this 'levels', like that mod is higher for example?
or do i actully need to make them in a list?

Offline tzahush

  • Newbie
  • *
  • Posts: 17
  • Karma: 1
Re: ulx can target
« Reply #3 on: April 19, 2014, 04:41:41 AM »
What I mean is If the server will recognise that Admin is higher then Moderator, And then Supervisor is higher then senioradmin, and such..

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: ulx can target
« Reply #4 on: April 19, 2014, 07:34:12 AM »
What I mean is If the server will recognise that Admin is higher then Moderator, And then Supervisor is higher then senioradmin, and such..
That you need to set up using the inheritance system.
bw81@ulysses-forums ~ % whoami
Homepage

Offline tzahush

  • Newbie
  • *
  • Posts: 17
  • Karma: 1
Re: ulx can target
« Reply #5 on: April 19, 2014, 03:55:54 PM »
so who should inherit from how, just to be sure.

Offline tzahush

  • Newbie
  • *
  • Posts: 17
  • Karma: 1
Re: ulx can target
« Reply #6 on: April 19, 2014, 04:35:08 PM »
OK i made this:
user = *
moderator = !%admin
moderator inherit from user
admin = !%senioradmin
admin inherit from moderator
senioradmin = !%supervisor
senioradmin inherit from admin
supervisor = !%superadmin
supervisor inherit from senioradmin
superadmin = *
super admin doesnt inherit.
Then this is whats going on:
A Moderator cant pick up admin, BUT he can pick up everything above him.
An Admin cant pick up senior, but he can pick up Moderator, Senior Admin, Supervisor and Super admin.
and so on..
Got any idea why?

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: ulx can target
« Reply #7 on: April 19, 2014, 04:41:14 PM »
Since moderator is inheriting from user and user can target EVERYONE (asterisk = everyone), then moderator inherits the "can_target". Change user's can_target to !%moderator in this case.
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline tzahush

  • Newbie
  • *
  • Posts: 17
  • Karma: 1
Re: ulx can target
« Reply #8 on: April 19, 2014, 04:54:50 PM »
after making this change, the system works exactly as i told you it does.

Offline tzahush

  • Newbie
  • *
  • Posts: 17
  • Karma: 1
Re: ulx can target
« Reply #9 on: April 21, 2014, 03:37:41 AM »
bump

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: ulx can target
« Reply #10 on: April 21, 2014, 03:44:44 AM »
Can you attach your groups.txt (located in <Garry's Mod directory>/data/ulib/groups.txt) so I can take a look at it?
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline tzahush

  • Newbie
  • *
  • Posts: 17
  • Karma: 1
Re: ulx can target
« Reply #11 on: April 21, 2014, 04:30:10 AM »

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: ulx can target
« Reply #12 on: April 21, 2014, 08:09:56 AM »
I've looked through it. Your inheritance tree is sort of messy, which is probably what causes issues. You need to make sure that the groups inherit from each other to make sure that the "ranks" are setup in the right way (I also just noticed that you said superadmin doesn't inherit). A lot of groups inherit from a group that inherits from user. For example superadmin. It should, in theory work, if this is done:

Code: [Select]
user - can_target: !%moderator
moderator - can_target: !%admin - inherits: user
admin - can_target: !%senioradmin - inherits: moderator
senioradmin - can_target: !%supervisor - inherits: admin
supervisor - can_target: !%superadmin - inherits: senioradmin
superadmin - can_target: * - inherits: supervisor

The last part is the most important one, since if superadmin inherits nothing, it inherits user by default (at least I think so), which in the end means that it's pretty much not anything higher than moderator (that is rank-wise, command-wise it's different).

I hope I explained it right, since this sort of confuses me too (to anyone: feel free to correct any mistakes).
You should read these for a better explanation:
"How exactly does can_target work?" by Stickly Man! - http://forums.ulyssesmod.net/index.php/topic,5346.0.html
"Immunity: How It Works Now" by atomicspark - http://forums.ulyssesmod.net/index.php/topic,4314.msg16844.html (I recommend taking a look at the first reply in this thread too, by Megiddo)
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.