Player Groups

From GMod Wiki

Jump to: navigation, search

Users.txt

This text file is used to determine who is admin and super admin. Garry's Mod default users.txt file is located in <root gmod>\settings\ Your non-edited file should look like this:

"Users"
{
	//
	// This is your users file
	//
	// You can use this file to add people as admins on your server
	// Add them to the relevant section
	//
	// If you're a Lua coder you can add your own sections and use them
	// in your script by doing pl:IsUserGroup( "admin" ) etc
	//
 
	"superadmin"
	{
		//"garry"			"STEAM_0:1:7099"
	}
 
	"admin"
	{
		//"garry"			"STEAM_0:1:7099"
	}
 
}

You should just ignore everything after the double slashes, as those aren't important.

It's very simply set up; you have the name of the group, followed by a { on a new line, then the name of the player with their Steam ID on the next line. Garry has set himself in each category, but with two / before it, meaning it's commented out, and the game doesn't read it. To set yourself in either or both groups, change it to look like this:

"Users"
{
	//
	// This is your users file
	//
	// You can use this file to add people as admins on your server
	// Add them to the relevant section
	//
	// If you're a Lua coder you can add your own sections and use them
	// in your script by doing pl:IsUserGroup( "admin" ) etc
	//
 
	"superadmin"
	{
		"Jiggles"			"STEAM_0:1:7671671"
	}
 
	"admin"
	{
		"Jiggles"			"STEAM_0:1:7671671"
	}
 
}

Of course, enter your name and your Steam ID.

If you wish, you may also add non-standard groups. Any group added to users.txt can be detected using Player.IsUserGroup() - http://wiki.garrysmod.com/wiki/?title=Player.IsUserGroup

Additional Notes

  • Your Steam ID can be found by entering any server, and typing "status" without the quotes into your console.
Personal tools