Garry's Mod Wiki


  table util.GetUserGroups()


Returns a table of all SteamIDs that have a usergroup.

This returns the original usergroups table, changes done to this table are not retroactive and will only affect newly connected users
This returns only groups that are registered in the settings/users.txt file of your server.

In order to get the usergroup of a connected player, please use Player:GetUserGroup instead.


1 table
A table of users where the key is the SteamID of the user and the value is a table with 2 fields:
  • string name - Player Steam name
  • string group - Player usergroup name


Retrieve the names of every superadmin registered

local supadminsList = {} for steamid, infos in pairs(util.GetUserGroups()) do if == "superadmin" then supadminsList[#supadminsList + 1] = end end PrintTable(supadminsList)
1 = rubat 2 = garry