Raised This Month: $32 Target: $400
 8% 

[CS:GO] SourceMod + Admin + Group


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkadietz
Senior Member
Join Date: Jul 2011
Old 12-21-2013 , 10:27   [CS:GO] SourceMod + Admin + Group
Reply With Quote #1

Hi! I've got some issue with adding an admin with group privileges

Quote:
This is the error i've got from log
L 12/21/2013 - 17:192: [admin-flatfile.smx] Error(s) detected parsing addons/sourcemod/configs/admins.cfg
L 12/21/2013 - 17:192: [admin-flatfile.smx] (line 42) Line contained too many invalid tokens
Here is my admin_groups.cfg

Code:
Groups
{
	/**
	 * Allowed properties for a group:
	 *
	 *   "flags"           - Flag string.
	 *   "immunity"        - Immunity level number, or a group name.
	 *						 If the group name is a number, prepend it with an 
	 *						 '@' symbol similar to admins_simple.ini.  Users 
	 *						 will only inherit the level number if it's higher 
	 *						 than their current value.
	 */
	"Default"
	{
		"immunity"		"1"
	}
	
	"Full Admins"
	{
		/**
		 * You can override commands and command groups here.
		 * Specify a command name or group and either "allow" or "deny"
		 * Examples:
		 * 		":CSDM"			"allow"
		 *		"csdm_enable"	"deny"
		 */
		 Overrides
		 {
		 }
		"flags"			"abcdefghiz"

		/* Largish number for lots of in-between values. */
		"immunity"		"99"
	}
	"root"
	{
		"flags"		"z"
		"immunity"		"99"
	}
	"General"
	{
		"flags"		"acdefghjkm"
		"immunity"		"98"
	}
	"Colonel"
	{
		"flags"		"acdefghjk"
		"immunity"		"97"
	}
	"Major"
	{
		"flags"		"acdefhjk"
		"immunity"		"96"
	}
	"Captain"
	{
		"flags"		"acdefjk"
		"immunity"		"95"
	}
	"Lieutenant"
	{
		"flags"		"acfjk"
		"immunity"		"94"
	}
	"Sergeant"
	{
		"flags"		"afjk"
		"immunity"		"93"
	}
}
Here is my admins.cfg

Code:
/**
 * USE THIS SECTION TO DECLARE DETAILED ADMIN PROPERTIES.
 *
 * Each admin should have its own "Admin" section, followed by a name.
 * The name does not have to be unique.
 *
 * Available properties: (Anything else is filtered as custom)
 *      "auth"          - REQUIRED - Auth method to use.  Built-in methods are:
 *                        "steam"  - Steam based authentication
 *                        "name"   - Name based authentication
 *                        "ip"	- IP based authentication
 *                        Anything else is treated as custom.
 *					 Note: Only one auth method is allowed per entry.
 *
 *      "identity"      - REQUIRED - Identification string, for example, a steamid or name.
 *					 Note: Only one identity is allowed per entry.
 *
 *      "password"      - Optional password to require.
 *      "group"         - Adds one group to the user's group table.
 *      "flags"         - Adds one or more flags to the user's permissions.
 *		"immunity"		- Sets the user's immunity level (0 = no immunity).
 *						  Immunity can be any value.  Admins with higher 
 *						  values cannot be targetted.  See sm_immunity_mode 
 *						  to tweak the rules.  Default value is 0.
 *
 * Example:
	"BAILOPAN"
	{
		"auth"			"steam"
		"identity"		"STEAM_0:1:16"
		"flags"			"abcdef"
	}
 *
 */

Admins
{
	"Kiril"
	{
		"auth"	"steam"
		"identity"	"STEAM_1:0:27724276"
                #"flags"        "z"
                #"immunity"     "99"
		"group"       "root"
	}
}

Last edited by Arkadietz; 12-21-2013 at 21:54.
Arkadietz is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 12-21-2013 , 21:10   Re: [CS:GO] SourceMod + Admin + Group
Reply With Quote #2

Please use [code] tags and not [quote] tags.
People can help you much faster/easier.

Last edited by Maxximou5; 12-21-2013 at 21:10.
Maxximou5 is offline
Arkadietz
Senior Member
Join Date: Jul 2011
Old 12-21-2013 , 21:56   Re: [CS:GO] SourceMod + Admin + Group
Reply With Quote #3

[QUOTE=Maxximou5;2074815]Please use [code] tags and not
Quote:
tags.
People can help you much faster/easier.
Done. I can't understand exactly what's the role of groups. Because my first idea was to add mu custom groups and all info in admins.cfg have to be included from there.
Arkadietz is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 12-21-2013 , 23:59   Re: [CS:GO] SourceMod + Admin + Group
Reply With Quote #4

The idea of admin groups is to seperate and control the actions, flags, and permissions of the group. Immunity as an example makes it so a Captain can not slap/slay the Root or General.

Well I see your problem.
Replace all the text in the file with the following below. Your problem was having an example that malformed your formatting.
For admins.cfg use just this:
Code:
Admins
{
    "Kiril"
    {
        "auth"    "steam"
        "identity"    "STEAM_1:0:27724276"
        "group"       "root"
    }
}
As for admin_groups.cfg use this:
Code:
"Groups"
{
    "root"
    {
        "flags"        "z"
        "immunity"        "99"
    }
    "General"
    {
        "flags"        "acdefghjkm"
        "immunity"        "98"
    }
    "Colonel"
    {
        "flags"        "acdefghjk"
        "immunity"        "97"
    }
    "Major"
    {
        "flags"        "acdefhjk"
        "immunity"        "96"
    }
    "Captain"
    {
        "flags"        "acdefjk"
        "immunity"        "95"
    }
    "Lieutenant"
    {
        "flags"        "acfjk"
        "immunity"        "94"
    }
    "Sergeant"
    {
        "flags"        "afjk"
        "immunity"        "93"
    }
}

Last edited by Maxximou5; 12-22-2013 at 00:01.
Maxximou5 is offline
gildevanaraujo
Senior Member
Join Date: Oct 2018
Location: Brazil
Old 11-12-2018 , 09:14   Re: [CS:GO] SourceMod + Admin + Group
Reply With Quote #5

God, I did not see that mistake!
Thank you!!!
gildevanaraujo is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode