Author Topic: remove can_target from targetting self  (Read 1793 times)

0 Members and 1 Guest are viewing this topic.

Offline jacksop

  • Newbie
  • *
  • Posts: 17
  • Karma: 1
remove can_target from targetting self
« on: January 02, 2020, 10:40:42 PM »
Hey I am trying to make it so a particular ulx command can only target 1 ulx group.

Lets call this command !bump. The higher rank is biggroup and the lower rank is littlegroup
By using "can_target" = "#littlegroup" it ignores all other groups and allows to use command on people in the "littlegroup" however it also allows for this command to be used on "biggroup" which is not what I want.

I want to make it exclusive that only the players in the littlegroup can be affected by the players in the biggroup who cast the command on them.

I have also tryed "can_target" = "#littlegroup,!%biggroup" which doesnt work either.

Thanks in advance

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: remove can_target from targetting self
« Reply #1 on: January 03, 2020, 04:52:24 PM »
If you aren't wanting to affect the ability of littlegroup to use all commands they have access to, you wouldn't use can_target.
Can_target is group specific, not command specific. Though you might prevent littlegroup from using ulx bump, you'd also prevent them from using any other ulx commands on any other group.

To adjust access to commands specifically, you could use something like ' ulx groupallow littlegroup "ulx bump" "#littlegroup" '
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline jacksop

  • Newbie
  • *
  • Posts: 17
  • Karma: 1
Re: remove can_target from targetting self
« Reply #2 on: January 03, 2020, 05:31:38 PM »
Ahh okay that sorta makes sense. Thanks for the fast reply!

However I want to make it so big group can use the !bump command to ONLY target players that are in little group.
So they aren't allowed to target any other player on the server except if they are in little group, including themselves.

Is this still the way to do it??

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: remove can_target from targetting self
« Reply #3 on: January 03, 2020, 11:58:49 PM »
 ' ulx groupallow biggroup "ulx bump" "#littlegroup,^" '
Changed group being modified, and added limitation to add ^ (self)
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming