A lot of people have been confused recently with the change in how player immunity works. I'll provide a few examples and hopefully it'll be intuitive enough for you to figure out.
ulx adduser <player> <group> 1Immunity was granted per player and blocked every ulx command from any player who did not have "overrideimmunity" access (superadmin by default). Megiddo thought this was silly and removed it completely from ULX.
Now I know many of you would like this feature back for whatever reason. Maybe you have a few immature admins or as a server owner, you really just don't trust other players. Fear not! I have good news for you. You can still have this feature by taking advantage of the new
command system and
targeting system.
ulx groupallow <group> <command> "!%group"As you can see, the new way is more complex, but better fits the whole "access is defined per group and not per player" motto. This is backwards then before. Instead of defining who you want to have immunity, you now define what groups players can not use the command on. In the above command, the "%group" access tag allows the group to use the command only on the specified group. The "!" is not (or reverses it). Now I know it's confusing since I have "group" listed twice, but just remember that the first group is the group the player is in and the second group is the target group that you want to prevent the player form using the command on.
NOTE: Advanced ULX functionality is not for the faint of heart. I recommend that you back up your current ULib folder (in garrysmod/data/ULib) before changing default access tags. If all else fails, you can always delete that folder and have it regenerated at server restart (it probably wont appear until you use a command that changes ULib access).
Simple Exampleulx groupallow operator "ulx ban" "!%admin"This should disallow operators to ban both admins and superadmins. Remember, default ULib groups inherit from each other. The default inheritance is
user >
operator >
admin >
superadmin.
Another Exampleulx groupallow admin "ulx ban" "!%superadmin"This prevents admins from banning superadmins. Basically the above command states "allow admins to use ulx ban, but not on super admins". Remember, if you change any of the default access tags, you must allow access to the groups higher up on the group hierarchy if you want them to remain normal. So now allow access to ulx ban to superadmins:
ulx groupallow superadmin "ulx ban"I hope this helps out a little for those who are having trouble with the new command system. Keep in mind that I wrote this from memory at work and without access to my Windows machine that runs my dedicated server. There may be inaccuracies in my post and if there are, please point them out to me and I'll make corrections accordingly.