General > Developers Corner
Getting all ULX ranks
Promptitude:
How would I check all ULX ranks inside of a .lua file?
Timmy:
All groups (and their permissions) are stored in ULib.ucl.groups.
--- Code: ---for group in pairs(ULib.ucl.groups) do
print(group)
end
--- End code ---
Promptitude:
Is it stored anywhere without permissions so I don't have to take them out?
Timmy:
Yes! It looks like the group names are also stored in ulx.group_names.
https://github.com/TeamUlysses/ulx/blob/40274fe877c970a71437c583c9640a718ebb80ba/lua/ulx/modules/sh/user.lua#L24
--- Code: ---> PrintTable(ulx.group_names)...
1 = superadmin
2 = operator
3 = user
4 = admin
--- End code ---
Edit: But you'd have to make sure your script executes after ulx/lua/ulx/modules/sh/user.lua, which could be annoying.
Promptitude:
It executes on command. Just a derma menu.
Also, thanks a heap for the help.
Navigation
[0] Message Index
[#] Next page
Go to full version