Get all ULX permissions

I was wondering if there is any easy way to query all ulx permissions of a certain player. I know how to check to see if they have a single command but I’m attempting to make a menu that checks for commands they have and adds them to a list. Any ideas on how to do this?

Your best bet is to iterate through ULib.cmds.translatedCmds and call ply:query() on each command (don’t forget to look at opposite commands, too). This is how XGUI does it:

Otherwise, the other way would be to replicate how :query() works, but build a list of commands instead of checking a single one. See here:

(You’ll have to merge the user’s allowed commands list along with each inherited group’s allowed commands list, then subtract the user’s deny list).