Post Sun Oct 04, 2009 9:20 pm

Admins for Garry's Mod

This tutorial will discuss how you can add admins to your garrysmod server. This tutorial requires you know how to find your steam ID, find that tutorial here: viewtopic.php?f=10&t=39 This tutorial also requires that you already have a working knowledge of FTP and how to use it with your server. If you do not, please read that tutorial, here first: viewtopic.php?f=10&t=35, then come back. Thank you.

Now, to get started.

FTP to your server to the /garrysmod/settings folder.

Inside of this folder, you will find a text file called "users.txt" ... here is an example of the "stock" file that garrysmod servers have:
  Code:
"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"
   }

}


Now, lines that start with "//" are comments, this means they are not processed as admins, so as it stands now, garry doesn't have admin or superadmin in this default file. Add your steam ID and name to the file like this, for instance, if my name was "ughsupport", and my steam ID was "STEAM_0:0:12345678" then I would add that to the file so it looked like this:

  Code:
"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"
      "ughsupport"      "STEAM_0:0:12345678"
   }
   
   "admin"
   {
      //"garry"         "STEAM_0:1:7099"
      "ughsupport"      "STEAM_0:0:12345678"
   }

}


Now, save that file and re-upload it to your server. Restart your server and you will have admin rights. This also works well for admin plugins such as ulx.

Good luck and have fun!

-UGH Support Staff