Author Topic: Adding a 2nd parameter for can_target  (Read 2197 times)

0 Members and 2 Guests are viewing this topic.

Offline sabo

  • Full Member
  • ***
  • Posts: 136
  • Karma: 2
  • Hello :)
    • The Elite Gaming
Adding a 2nd parameter for can_target
« on: May 12, 2013, 12:39:10 PM »
As stated in this thread: http://forums.ulyssesmod.net/index.php/topic,5346.0.html

Quote
So, to solve the problem above, you would do: "ulx setgroupcantarget mod !%mod,^"  This means "mod can target NOT group mod, can target self"  (The comma basically just adds another separate parameter)

You can add a 2nd parameter for targeting groups.

What I want is: Superadmins can target Superadmin and all under superadmin. Superadmins can not Target the Owner (higher rank) and can not target themself.

So I did this: " ulx setgroupcantarget superadmin !%owner,!^ "

The "^" stands for the person who wrote the command
The "!" stands for not
"!^" means for me: NOT me

It does not work so can someone help me out in this please?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Adding a 2nd parameter for can_target
« Reply #1 on: May 12, 2013, 01:01:41 PM »
Define "it doesn't work".
What error? What isn't working?
What access person is trying to do what to what access person?
Do you have owner inheriting superadmin (which then inherits restrictions)?
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Adding a 2nd parameter for can_target
« Reply #2 on: May 13, 2013, 11:53:40 AM »
The comma is a union operator, so you can't allow a group to target others in the group but not themselves. I know this restriction is annoying for cases like this, but to make it any more complicated we would have had to create a parser with associated grammar and order of operations (in other words, way too much overhead for this feature).
Experiencing God's grace one day at a time.

Offline sabo

  • Full Member
  • ***
  • Posts: 136
  • Karma: 2
  • Hello :)
    • The Elite Gaming
Re: Adding a 2nd parameter for can_target
« Reply #3 on: May 13, 2013, 01:17:48 PM »
The comma is a union operator, so you can't allow a group to target others in the group but not themselves. I know this restriction is annoying for cases like this, but to make it any more complicated we would have had to create a parser with associated grammar and order of operations (in other words, way too much overhead for this feature).

Okay I guess there is no way to change that.

Thanks for the answer atleast I am aware of the situation now :)

Have a nice day ;)