ULX

Author Topic: Setting group can_target to only oneself?  (Read 2021 times)

0 Members and 1 Guest are viewing this topic.

Offline Coal Felpz

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Setting group can_target to only oneself?
« on: December 16, 2015, 07:15:48 PM »
Hello there,
After tweaking every last aspect of ULX to my server's need, I have run into one problem. I wanted to grant players the ability to apply and remove godmode as they desired, but only to themselves. It appears that this cannot be done, as the few strings I have become aware of (!, %, $) do not seem in any way helpful to me. Is there a string I can provide for can_target that would allow the 'user' group to only target themselves? Not as a group, but as individuals; a personal god mode without the possibility to grant or remove it from anyone else.

I really did try to figure this out but I am out of ideas, I tried, I guessed, I searched for answers and I figured this was a good place to try.
If anyone knows a way this can be done, please let me know here.

Much appreciated in advance,
Coal Felpz

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Setting group can_target to only oneself?
« Reply #1 on: December 16, 2015, 07:39:24 PM »
Well the caret (^) targets yourself when used in chat commands, so it might be worth a try.
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Setting group can_target to only oneself?
« Reply #2 on: December 16, 2015, 08:12:21 PM »
What Roastchicken says
] ulx groupallow user "ulx god" "^,!<group_above_user>"
"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: Setting group can_target to only oneself?
« Reply #3 on: December 17, 2015, 03:36:25 AM »
Ulx help in console would have shown you this, as well.
Experiencing God's grace one day at a time.

Offline Coal Felpz

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Setting group can_target to only oneself?
« Reply #4 on: December 17, 2015, 04:08:58 PM »
Actually it explained most strings except for the one I was looking for, the ^, which was for self.
I even tried usermanagementhelp. I may have missed it regardless.

But thank you, this is exactly what I was looking for and I couldn't seem to find it. Much appreciated!

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Setting group can_target to only oneself?
« Reply #5 on: December 17, 2015, 07:29:14 PM »
Just fyi for reference - bold by me
Below is the ULX help view for a superadmin from ULX
] ULX Help:
ULX Help:
If a command can take multiple targets, it will usually let you use the keywords '*' for target
all, '^' to target yourself, '@' for target your picker, '$<userid>' to target by ID (steamid,
uniqueid, userid, ip), '#<group>' to target users in a specific group, and '%<group>' to target
users with access to the group (inheritance counts). IE, ulx slap #user slaps all players who are
in the default guest access group. Any of these keywords can be preceded by '!' to negate it.
EG, ulx slap !^ slaps everyone but you.
You can also separate multiple targets by commas. IE, ulx slap bob,jeff,henry.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming