Ads by Google

Attention

Dear readers some features of this website is not working in mobile webpage view. So please I'm requesting you to configure your mobile webpage to desktop view, then all features of this website will work properly.

Wednesday, 29 April 2015

HOW TO CREATE A COUNTER STRIKE 1.6 SERVER Part 9: How to add admin

In this part I’ll discuss about the process of adding admins in a Half Life Dedicated Server (i.e. Counter Strike 1.6 server). In AMX Mod X all admin information are stored in user.ini file. You can find this file in cstrike\addons\amxmodx\configs. If you open this file using any text editor you will find lines started with semi colon (i.e. ;). These lines are comment lines. At the bottom of this file you have to save admin information. Server will execute this file at the time of starting. One line for one admin entry and a space between each parameter. Before save any admin entry we have to know about four options Authentication, Password, Access Right & Connection Properties.

Authentication: In early days of Half Life 1, every server authenticates their admin by using admin’s name. Now Concept has changed. Now a days it is recommended to authenticate an admin by their Steam ID, you can also authenticate an admin by his static IP address.

Password: In you server there might be some non-steam admins. In that case it is important to set an admin password. For non-steam admin we have to authenticate that player by his/her name. If we don’t set any admin password, any player with admin name will get admin privilege. Though there is another way to authenticate a non-steam player i.e. using his/her static IP address. But in general internet users use dynamic IP address. So it is highly recommended to set password for both steam and non-steam admins.
            Note: If there is an admin password in server, then each and every admin have to set his/her password. Admins have to type setinfo _pw “pass” (where pass is the password assigned to him/her) in his game console.

Access Right: There are 22 access levels (also known as access flags) in AMX Mod X. I’ll discuss all of them in details.

Flags
Purpose
a
Immunity (can't be kicked/banned/slayed/slapped and affected by other commands).
b
Reservation (can join on reserved slots).
c
Access to amx_kick command.
d
Access to amx_ban and amx_unban commands.
e
Access to amx_slay and amx_slap commands.
f
Access to amx_map command.
g
Access to amx_cvar command (not all cvars will be available).
h
Access to amx_cfg command.
i
Access to amx_chat and other chat commands.
j
Access to amx_vote and other vote commands.
k
Access to sv_password cvar (by amx_cvar command).
l
Access to amx_rcon command and rcon_password cvar (by amx_cvar command).
m
Custom level A (for additional plugins).
n
Custom level B (for additional plugins).
o
Custom level C (for additional plugins).
p
Custom level D (for additional plugins).
q
Custom level E (for additional plugins).
r
Custom level F (for additional plugins).
s
Custom level G (for additional plugins).
t
Custom level H (for additional plugins).
u
Menu access.
z
User (no admin).

Many server makes two type admins Head admin Normal admins. They give all access to their Head admins i.e. Head admins have access flag a to u (don’t put z. If you put z the player will become normal player.) And for Normal admins they restrict some flags like a, k, l. They omit this flags at access level.

            Connection Properties:         
Flags
Purpose
a
Disconnect player on invalid password.
b
Clan tag.
c
This is steam ID.
d
This is IP.
e
Password is not checked (only name/IP/steam ID needed).
k
Name or tag is case sensitive.

            Note: In case of k flag suppose you set name “Abc” then anybody can use name “aBc”, “abC”, “ABC” etc. but no one can use name “Abc”.

Format of admin account:
< Name |IP| steam ID> <password> <access flags> <account flags>

Example of admin entry:
1.      "STEAM_0:0:123456" "" "abcdefghijklmnopqrstu" "ce"
2.      "123.45.67.89" "" "abcdefghijklmnopqrstu" "de"
3.      "My Name" "my_password" "abcdefghijklmnopqrstu" "a"

            Now look at those entries, in example no 1 1st parameter is steam ID, 2nd parameter for password in this entry password field is blank i.e. no password has been set, 3rd parameter is access flags, and 4th parameter is connection flags. As steam ID is used to make admin and no password set so we used flag c and e. In example no 2 in 1st parameter we used IP address and we didn’t set any password so in last parameter we used flag d and e. In example no 3 we used name and we also set a password for that reason we used a at last parameter. Suppose you used steam ID in 1st parameter and also set a password then you have to use ac flag in 4th parameter or suppose you used IP in fast parameter and also set a password in 2nd field then you have to use ad flag in 4th parameter.

            There are two different way to add admins in your server.
Add admins normally: Just open user.ini file using your favourite text editor, and put your admin entry and save the file. I already mentioned that in very line you can add only one admin entry and there will be a space gap between every parameter.

Add admin using SQL server: If you want to use SQL server then you have to setup your SQL server. Go to cstrike\addons\amxmodx\configs folder and open modules.ini file using your favourite text editor. Enable SQL module by removing colon (i.e. ;) which is at the front of mysql. Then you have to configure you SQL settings. Open sql.cfg file using your favourite text editor from same folder. Now you will get some cavers.
Cvar
Default Settings
Purpose
amx_sql_host
"127.0.0.1"
IP address of SQL server.
amx_sql_user
"root"
Username to connect to the SQL server.
amx_sql_pass
""
Password to connect to the SQL server.
amx_sql_db
"amx"
Database to use on the SQL server.
amx_sql_table
"admins"
The table to use for the admin_sql plugin.
amx_sql_type
"mysql"
The database type to connect to.

Next you have to open plugins.ini file and disable admin.amxx by putting a colon at the front of admin.amxx & enable admin_sql.amxx by removing colon which is at the front of admin_sql.amxx.
It is recommended to use any SQL interface to add admin if you use SQL mod. The SQL quarry to add admin is INSERT INTO admins VALUES("STEAM_0:1:23456", "", "abcdefghijklmnopqrstu", "ce"); (it’s an example). You can also use add_admin command in server console to add your admin. Example amx_addadmin "STEAM_0:1:23456" "" "abcdefghijklmnopqrstu" "ce"

Now if you are using user.ini file and want to remove any admin just add a colon in front of that admin entry in user.ini file. And in case of SQL mode you can remove admin by using SQL interface.

Hope this post will help you. If you have any question feel free to ask. You can post your question(s) in comment section I’ll answer them. You can also post your valuable comments. Thank you.


No comments :

Post a Comment

Back to Top