General > Developers Corner

Get users in group

<< < (2/2)

JamminR:
More specifically, ULib.ucl.users has the info for each player you have stored using ULib.

(not real code, and I've not actually programmed in lua in years, so forgive me if my table-loop-fu is off, but you should get the general idea)

--- Code: ---for i, kn in pairs(ULib.ucl.users) do
    testit = ULib.ucl.users[i]
    if lower(testit["group"]) == lower("<group you are looking for>")
        table.insert ( names, testit["name"] )
    end
end
-- now do vgui stuff with your table of "names"

--- End code ---

iViscosity:
So if that's how you would use it, Lua (or at least gLua) uses string.lower, instead of just "lower".

Navigation

[0] Message Index

[*] Previous page

Go to full version