INX Gaming Tutorial: Add admin with Sourcemod (Detailed Method)

In this tutorial we are going to go through adding admins to your server with Sourcemod. There are two different ways of adding admins to your server. There is the ‘Simple’ method which is… well, what can i say? Simple. There is another method called detailed which is what we are going to go through in this tutorial.

The files that you are going to need to look at and/or edit are not available via the INX file editor as this method is for the more advanced user. However, you will still need to use the control panel for a server restart later on.

It may be easier for you to locate the files that you need and download them before we start to add information. You can download each file as and when you need them, but we like to make life easy here at INX and I find downloading them all first is much easier than the later. Please locate and download the following files via FTP to somewhere easy to find and access on your computer.

Navigate to the following location using your FTP client. srcds_l/cstrike/addons/sourcemod/configs/. Once you have navigated to the above location, there are three files you will need to download to get the ball rolling.

admins.cfg
admin_groups.cfg
admin_levels.cfg

Now lets have a brief overview on what each of these files contain. The admins.cfg file contains a list of all people who you have granted admin rights to on your server. This is where you will do the final task of adding their details to enable their access. Admin_levels.cfg holds the information which controls what features your admins can or can’t access. These are also known as admin flags which are denoted by a letter (e.g. abcdefg). Finally, the admin_groups.cfg is where you can create pre-set groups for admin rights. For example, you can create a group called ‘Full Admin’ and assign all admin permissions to that group. You can then create another group called ‘Basic Admin’ and only assign specific items like kick and change map. Another group could be called ‘Basic Admin with Ban’ which can hold all of the features of the basic admin group with the addition of the ban permission. You get the drift :)

Right, lets start with creating a group. To do this we will need to use the admin_levels.cfg and admin_groups.cfg files. There will be some default text within the admin_groups.cfg file, but i am going to trim down some of the nicey nicey stuff in the file and show you here just what is needed to avoid confusion.

Groups
{
“Full Admins”
{
Overrides
{
“sm_map”    ”allow”
“:CSDM”        ”deny”

}
“flags”            “abcdefhiz”
“immunity”        “99″
}
}

The short and sweet of the text (or mumbo jumbo) that is above is actually fairly simple. The part highlighted in red is the name of the group. The section highlighted in green is where you can specify which admin flags you want this group to be able to access. These flags can be seen in the admin_levels.cfg file which you downloaded earlier. You simply add a letter for each of the flags you wish this group to have access to. The final section which is highlighted in blue is the immunity level for the group. This is numerical and can be adjusted accordingly for the group as you wish.

The final section of the admin_groups.cfg file which we are going to cover is the overrides section which is highlighted in pink (yes… don’t ask!). Here you can specify specific commands that you wish the group to have access to even if you have not specified the flag in the flags section (highlighted green). In the example above there is no ‘change map’ flag specified which would be denoted by the letter ‘g‘. However, as i have specified that this group can have access to the sm_map command, this function can still be carried out. On the other side of the table, i have specified that this group is to be denied all access to any command from the CSDM (Counter Strike Death Match) menu. Simply add the command and allow or deny respectively.

So, lets create groups for ‘Full Admin’, ‘Basic Admin’ and ‘Basic Admin with Ban’ which should get you started and well on your way!

Groups
{
“Full Admin”
{
Overrides
{
}
“flags”        ”z”
“immunity”    ”99″
}
}

{
“Basic Admin”
{
Overrides
{
}
“flags”        ”bfgjk”
“immunity”    ”0″
}
}

{
“Basic Admin with Ban”
{
Overrides
{
}
“flags”        ”bdefgjk”
“immunity”    ”0″
}
}

If you place that into your admin_groups.cfg file, this should give you a good starting point to start giving out admin permissions to people of your choice.

Now we have specified the groups and what permissions that each group has, we not have to assign those groups to users. For this we are going to now look at the admins.cfg file. Again, there is some default text in the file, but i am only going to show in this tutorial what is actually used.

Admins
{
“Bashful”
{
“auth”            ”steam”
“identity”        ”STEAM_0:1:123456″
“flags”            ”"
“group”            ”Full Admin”
}
}
{
“Doc”
{
“auth”            ”steam”
“identity”        ”STEAM_0:1:123456″
“flags”            ”"
“group”            ”Full Admin”
}
}
{
“Dopey”
{
“auth”            ”steam”
“identity”        ”STEAM_0:1:123456″
“flags”            ”"
“group”            ”Basic Admin with Ban”
}
}
{
“Grumpy”
{
“auth”            ”steam”
“identity”        ”STEAM_0:1:123456″
“flags”            ”"
“group”            ”Basic Admin with Ban”
}
}
{
“Happy”
{
“auth”            ”steam”
“identity”        ”STEAM_0:1:123456″
“flags”            ”"
“group”            ”Basic Admin”
}
}
{
“Sleepy”
{
“auth”            ”steam”
“identity”        ”STEAM_0:1:123456″
“flags”            ”"
“group”            ”Basic Admin”
}
}
{
“Sneezy”
{
“auth”            ”steam”
“identity”        ”STEAM_0:1:123456″
“flags”            ”"
“group”            ”Basic Admin”
}
}

Excuse the names used in here again :) You will notice that there are no flags set against the users in this file. This is because all of the permissions are assigned from the groups which we setup earlier on. All that there is left to do now is to upload the files back to the server and hit the restart button.

Your admins (in this case the seven dwarfs) should have admin permissions according to the group they are set against.

This entry was posted in Tutorials. Bookmark the permalink.

One Response to INX Gaming Tutorial: Add admin with Sourcemod (Detailed Method)

  1. Kasper says:

    reservation ” a ” Reserved slot access.
    generic “b ” Generic admin; required for admins.
    kick ” c ” Kick other players.
    ban ” d” Ban other players.
    unban “e” Remove bans.
    slay ” f” Slay/harm other players.
    changemap ” g ” Change the map or major gameplay features.
    cvar ” h” Change most cvars.
    config ” i” Execute config files.
    chat ” j” Special chat privileges.
    vote “k” Start or create votes.
    password ” l” Set a password on the server.
    rcon ” m” Use RCON commands.
    cheats “n” Change sv_cheats or use cheating commands.
    root “z” Magically enables all flags.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>