ULX

Author Topic: Group can target, need help!  (Read 3398 times)

0 Members and 1 Guest are viewing this topic.

Offline rs1485

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Group can target, need help!
« on: November 03, 2013, 04:12:49 AM »
Hi!

I made about 10 different ranks/groups called _A _B _C _D _E _F _G _H _I _J
I wrote big single letters to make it easier...

It looks like this:
Name: _A
Inherits from: user
Can target: !%_B

Name _B
Inherits from _A
Can target !%_C

And so on.

The only problem is that _A can still slap (or use commands on) _B to _J

It's striahgt inheritance, no branches.

What might the problem be?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Group can target, need help!
« Reply #1 on: November 03, 2013, 06:57:01 AM »
Run ulx debuginfo in server console and paste the results here.
Experiencing God's grace one day at a time.

Offline rs1485

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Group can target, need help!
« Reply #2 on: November 04, 2013, 01:21:51 PM »
I changed the inheritances now.

Everything is like this: "<-" mean inherited by

user (inherited by operator inherited by admin inherited by superadmin
user inherited by A <- B <- C <-D
operator inherited by E <- F <- G
admin <- H <- I <- J

Those that inherit from user can't target those that inherit from operator
same for operator and admin
same for admin and superadmin

Code: [Select]
ULib.ucl.groups (#=20):
Guest:
team:
color_green = 102
index = 22
order = 2
color_red = 102
name = Guest
color_blue = 102
can_target = !%operator
allow:
1 = ulx motd
2 = ulx psay
3 = ulx thetime
4 = ulx who
inherit_from = user
HeadAdmin:
allow:
1 = ulx map
can_target = !%superadmin
inherit_from = SAdmin
SAdmin:
team:
color_green = 97
index = 33
order = 13
color_red = 255
name = Super Admin
color_blue = 0
can_target = !%superadmin
allow:
1 = ulx ban
2 = ulx banid
3 = ulx cloak
4 = ulx maul
5 = ulx playsound
6 = ulx uncloak
7 = ulx voteban
inherit_from = Admin
CM:
inherit_from = superadmin
allow:
1 = ulx addgroup
2 = ulx adduser
3 = ulx adduserid
4 = ulx armor
5 = ulx asay
6 = ulx ban
7 = ulx blind
8 = ulx bring
9 = ulx cexec
10 = ulx chattime
11 = ulx cloak
12 = ulx csay
13 = ulx echours
14 = ulx ent
15 = ulx exec
16 = ulx freeze
17 = ulx gag
18 = ulx gimp
19 = ulx god
20 = ulx goto
21 = ulx groupallow
22 = ulx groupdeny
23 = ulx help
24 = ulx hiddenecho
25 = ulx hp
26 = ulx ignite
27 = ulx jail
28 = ulx jailtp
29 = ulx kick
30 = ulx kickafternamechanges
31 = ulx kickafternamechangescooldown
32 = ulx kickafternamechangeswarning
33 = ulx loadoutadd
34 = ulx loadoutremove
35 = ulx logchat
36 = ulx logdir
37 = ulx logecho
38 = ulx logechocolorconsole
39 = ulx logechocolordefault
40 = ulx logechocoloreveryone
41 = ulx logechocolormisc
42 = ulx logechocolorplayer
43 = ulx logechocolorplayerasgroup
44 = ulx logechocolors
45 = ulx logechocolorself
46 = ulx logevents
47 = ulx logfile
48 = ulx logjoinleaveecho
49 = ulx logspawns
50 = ulx logspawnsecho
51 = ulx luarun
52 = ulx map
53 = ulx mute
54 = ulx noclip
55 = ulx physgunplayer
56 = ulx playsound
57 = ulx print
58 = ulx ragdoll
59 = ulx rcon
60 = ulx removegroup
61 = ulx removeuser
62 = ulx removeuserid
63 = ulx renamegroup
64 = ulx reservedslots
65 = ulx restrict
66 = ulx rslots
67 = ulx rslotsmode
68 = ulx rslotsvisible
69 = ulx seeanonymousechoes
70 = ulx seeasay
71 = ulx send
72 = ulx setgroupcantarget
73 = ulx setlimit
74 = ulx showmotd
75 = ulx slay
76 = ulx spawnecho
77 = ulx spectate
78 = ulx sslay
79 = ulx strip
80 = ulx teleport
81 = ulx thetime
82 = ulx tsay
83 = ulx unban
84 = ulx unblind
85 = ulx uncloak
86 = ulx unfreeze
87 = ulx ungag
88 = ulx ungimp
89 = ulx ungod
90 = ulx unignite
91 = ulx unigniteall
92 = ulx unjail
93 = ulx unmute
94 = ulx unragdoll
95 = ulx unrestrict
96 = ulx urs_weaponpickups
97 = ulx userallow
98 = ulx userallowid
99 = ulx userdeny
100 = ulx userdenyid
101 = ulx usermanagementhelp
102 = ulx veto
103 = ulx vote
104 = ulx voteban
105 = ulx votebanminvotes
106 = ulx votebansuccessratio
107 = ulx voteecho
108 = ulx votekick
109 = ulx votekickminvotes
110 = ulx votekicksuccessratio
111 = ulx votemap
112 = ulx votemap2
113 = ulx votemap2minvotes
114 = ulx votemap2successratio
115 = ulx votemapenabled
116 = ulx votemapmapmode
117 = ulx votemapmintime
118 = ulx votemapminvotes
119 = ulx votemapsuccessratio
120 = ulx votemapvetotime
121 = ulx votemapwaittime
122 = ulx welcomemessage
123 = ulx whip
124 = xgui_gmsettings
125 = xgui_managebans
126 = xgui_managegroups
127 = xgui_svsettings
128 = xgui_urs
ulx slap = !%founder
team:
order = 14
health = 5700
color_red = 0
color_green = 85
stepSize = 25
index = 34
runSpeed = 1621
name = Community Manager
color_blue = 255
SModerator:
team:
color_green = 255
index = 30
order = 10
color_red = 208
name = Super Mod
color_blue = 0
can_target = !%admin
allow:
1 = ulx bring
2 = ulx sslay
3 = ulx uncloak
ulx ban = * 1:2h
ulx voteban = * 1:10h
ulx cloak = * 0:100
inherit_from = Moderator
Moderator:
team:
color_green = 255
index = 29
order = 9
color_red = 174
name = Moderator
color_blue = 0
can_target = !%admin
allow:
1 = ulx armor
2 = ulx god
3 = ulx spectate
4 = ulx ungod
ulx hp = * :10000
ulx voteban = * 1:1d
ulx ban = * 1:4h
inherit_from = JrModerator
AssCM:
allow:
1 = ulx cloak
2 = ulx hiddenecho
3 = ulx kick
4 = ulx map
5 = ulx noclip
6 = ulx playsound
7 = ulx reservedslots
8 = ulx seeanonymousechoes
9 = ulx send
10 = ulx spawnecho
11 = ulx spectate
12 = ulx unban
13 = ulx uncloak
14 = ulx veto
15 = ulx vote
16 = ulx votekick
17 = ulx votemap
18 = ulx votemap2
19 = xgui_svsettings
can_target = !%superadmin
inherit_from = HeadAdmin
JrAdmin:
team:
color_green = 195
index = 31
order = 11
color_red = 255
name = Jr Admin
color_blue = 0
can_target = !%superadmin
allow:
1 = ulx blind
2 = ulx kick
3 = ulx physgunplayer
4 = ulx strip
5 = ulx unblind
ulx banid = * 1:1w
ulx voteban = * 1:2w
ulx ban = * 1:1w
inherit_from = admin
Founder:
team:
color_green = 118
order = 6
index = 26
maxHealth = 100
health = 100
color_red = 242
name = Owner
color_blue = 118
allow:
1 = xgui_managegroups
inherit_from = CM
superadmin:
allow:
1 = apromote_settings
2 = ulx addgroup
3 = ulx adduser
4 = ulx adduserid
5 = ulx banid
6 = ulx cexec
7 = ulx ent
8 = ulx exec
9 = ulx groupallow
10 = ulx groupdeny
11 = ulx hiddenecho
12 = ulx loadoutadd
13 = ulx loadoutremove
14 = ulx logchat
15 = ulx logdir
16 = ulx logecho
17 = ulx logechocolorconsole
18 = ulx logechocolordefault
19 = ulx logechocoloreveryone
20 = ulx logechocolormisc
21 = ulx logechocolorplayer
22 = ulx logechocolorplayerasgroup
23 = ulx logechocolors
24 = ulx logechocolorself
25 = ulx logevents
26 = ulx logfile
27 = ulx logjoinleaveecho
28 = ulx logspawns
29 = ulx logspawnsecho
30 = ulx luarun
31 = ulx maul
32 = ulx print
33 = ulx rcon
34 = ulx removegroup
35 = ulx removeuser
36 = ulx removeuserid
37 = ulx renamegroup
38 = ulx restrict
39 = ulx setgroupcantarget
40 = ulx setlimit
41 = ulx unrestrict
42 = ulx userallow
43 = ulx userallowid
44 = ulx userdeny
45 = ulx userdenyid
46 = ulx voteecho
47 = xgui_gmsettings
48 = xgui_managebans
49 = xgui_managegroups
50 = xgui_svsettings
51 = xgui_urs
inherit_from = admin
VIP:
allow:
can_target = !%operator
inherit_from = Trusted
user:
allow:
1 = ulx asay
2 = ulx echours
3 = ulx help
4 = ulx motd
5 = ulx psay
6 = ulx urs_weaponpickups
7 = ulx usermanagementhelp
8 = ulx who
can_target = !%operator
team:
color_green = 84
index = 21
order = 1
color_red = 84
name = Newbie
color_blue = 84
JrModerator:
team:
color_green = 255
index = 28
order = 8
color_red = 123
name = Jr Moderator
color_blue = 0
can_target = !%admin
allow:
1 = ulx ragdoll
2 = ulx unignite
3 = ulx unjail
4 = ulx unragdoll
5 = ulx vote
ulx ungod = ^
ulx jailtp = * :100
ulx god = ^
ulx voteban = * 1:60
ulx ignite = * :60
ulx ban = * 1:2h
inherit_from = Trial
Regular:
inherit_from = Guest
can_target = !%operator
allow:
team:
color_green = 122
index = 23
order = 3
color_red = 122
name = Regular
color_blue = 122
Trusted:
team:
color_green = 196
index = 25
order = 5
color_red = 196
name = Trusted
color_blue = 196
can_target = !%operator
allow:
inherit_from = Respected
admin:
can_target = !%superadmin
allow:
1 = ulx armor
2 = ulx ban
3 = ulx bring
4 = ulx csay
5 = ulx freeze
6 = ulx gag
7 = ulx gimp
8 = ulx god
9 = ulx goto
10 = ulx hp
11 = ulx ignite
12 = ulx jail
13 = ulx jailtp
14 = ulx mute
15 = ulx ragdoll
16 = ulx slap
17 = ulx slay
18 = ulx sslay
19 = ulx strip
20 = ulx thetime
21 = ulx tsay
22 = ulx unfreeze
23 = ulx ungag
24 = ulx ungimp
25 = ulx ungod
26 = ulx unignite
27 = ulx unigniteall
28 = ulx unjail
29 = ulx unmute
30 = ulx unragdoll
31 = ulx whip
inherit_from = operator
Respected:
team:
color_green = 153
index = 24
order = 4
color_red = 153
name = Respected
color_blue = 153
can_target = !%operator
allow:
inherit_from = Regular
operator:
can_target = !%admin
allow:
1 = ulx seeasay
inherit_from = user
Trial:
team:
color_green = 255
order = 7
index = 27
health = 250
color_red = 21
name = Trial
color_blue = 0
can_target = !%admin
allow:
1 = ulx freeze
2 = ulx gag
3 = ulx gimp
4 = ulx goto
5 = ulx kick
6 = ulx mute
7 = ulx slay
8 = ulx unfreeze
9 = ulx ungag
10 = ulx ungimp
11 = ulx unjail
12 = ulx unmute
13 = ulx votekick
ulx slap = * :0
ulx jail = * :100
ulx god = ^
ulx ungod = ^
ulx voteban = * 1:31
inherit_from = operator
Admin:
team:
color_green = 161
stepSize = 18
index = 32
order = 12
color_red = 255
name = Admin
color_blue = 0
can_target = !%superadmin
allow:
1 = ulx hiddenecho
2 = ulx kick
3 = ulx noclip
4 = ulx reservedslots
5 = ulx seeanonymousechoes
6 = ulx send
7 = ulx spawnecho
8 = ulx spectate
9 = ulx teleport
10 = ulx unban
11 = ulx unigniteall
12 = ulx veto
13 = ulx vote
14 = ulx votekick
15 = ulx votemap
16 = ulx votemap2
17 = ulx whip
ulx banid = * 1:3w
ulx voteban = * 1:4w
ulx ban = * 1:3w
inherit_from = JrAdmin

Edit by Megiddo: Added code tags
« Last Edit: November 04, 2013, 05:23:47 PM by Megiddo »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Group can target, need help!
« Reply #3 on: November 04, 2013, 05:31:19 PM »
Both operator and guest inherit from user, so you do have branching. I recommend specifying what users can target, instead of what they can't. For example, for "VIP" you might set can_target to "#A,#B,#C,#D". Using "#" instead of "%" ignores inheritance, so you're specifying groups explicitly.

That's a fair amount of information condensed into a few sentences (very few people complain that I'm too wordy). Let us know if you need us to expand on anything.
Experiencing God's grace one day at a time.

Offline rs1485

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Group can target, need help!
« Reply #4 on: November 04, 2013, 10:53:59 PM »
I do have branching now because I changed the inheritances. At first I thought it would be easier to make everything start from user and make a straight branch but then I realised that other addons look for the admin and superadmin groups and you probably know the rest.

I totally understand what you are saying.

If you ever think about changing how immunities work, I suggest assigning a number to each group from 1 to 100. Group B with immunity level 35 can't target Group A with immunity level 50 because the number is higher than it's own number. I'm pretty sure you have thought of this but please enlighten me about why it doesn't work. You can go all technical if you want, I program a great deal so no problems with that stuff.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Group can target, need help!
« Reply #5 on: November 05, 2013, 05:14:52 AM »
We experimented with different ways of doing immunity, and this is the one we were happiest with. Our current way works well with how our target system works in general and meets almost everyone's needs, though sometimes users will have to be more explicit than others.
Experiencing God's grace one day at a time.

Offline gordythepirate

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Group can target, need help!
« Reply #6 on: November 06, 2013, 12:35:22 PM »
Both operator and guest inherit from user, so you do have branching. I recommend specifying what users can target, instead of what they can't. For example, for "VIP" you might set can_target to "#A,#B,#C,#D". Using "#" instead of "%" ignores inheritance, so you're specifying groups explicitly.

That's a fair amount of information condensed into a few sentences (very few people complain that I'm too wordy). Let us know if you need us to expand on anything.

This post should be its own sticky. I never knew about the "#" operator. You saved me *so* much time and hassle, thanks so much Megiddo! ^_^

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Group can target, need help!
« Reply #7 on: November 06, 2013, 02:35:19 PM »
This post should be its own sticky.

Already is, in the FAQs.

] 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.
All commands must be preceded by "ulx ", ie "ulx slap"

"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming