Difference between revisions of "Configuring AMX Mod X"

From AlliedModders Wiki
Jump to: navigation, search
m
(added sql crap)
Line 1: Line 1:
 
=Admins (non-SQL)=
 
=Admins (non-SQL)=
 +
==Adding an Admin==
 
First, open the amxmodx/configs/users.ini file with your favorite text editor.  Scroll to the bottom.  Admin entries are stored with four options: Authentication, Password, Access Right, Connection Properties.
 
First, open the amxmodx/configs/users.ini file with your favorite text editor.  Scroll to the bottom.  Admin entries are stored with four options: Authentication, Password, Access Right, Connection Properties.
  
Line 19: Line 20:
  
 
{{qnotice|'''Note:''' It is important that you do not use the 'z' flag for admins.}}
 
{{qnotice|'''Note:''' It is important that you do not use the 'z' flag for admins.}}
 +
 +
==Removing an Admin==
 +
Find the admin's entry in your amxmodx/configs/users.ini file, and put a semicolon in front of it.  For example:
 +
<pre>;"STEAM_0:0:123456" "" "abcdefghijklmnopqrstu" "ce"</pre>
 +
 +
That will prevent the entry from being read.
 +
  
 
=Admins (SQL)=
 
=Admins (SQL)=
 +
AMX Mod X lets you store admin accounts in a MySQL database.  This is ideal if you have multiple servers with common administrators.
 +
 +
==Configuring Server==
 
First, make sure you have mysql_amxx enabled in AMX Mod X's amxmodx/configs/modules.ini file.   
 
First, make sure you have mysql_amxx enabled in AMX Mod X's amxmodx/configs/modules.ini file.   
  
Line 51: Line 62:
 
| The table to use for the admin_sql plugin.
 
| The table to use for the admin_sql plugin.
 
|}
 
|}
 +
 +
Make sure your username and password have access that to the given database and table.  Then, open your amxmodx/configs/plugins.ini.  Comment out "admin.amxx" and enable "admin_sql.amxx":
 +
<pre>;admin.amxx
 +
admin_sql.amxx
 +
...</pre>
 +
 +
==Maintaining Admins==
 +
Once the server loads for the first time, it will automatically create the table specified with <tt>amx_sql_table</tt>.
 +
 +
You can either add an admin through an SQL tool like an SQL Console or phpMyAdmin, or you can add an admin [[Adding Admins (AMX Mod X)#Through Console|using amx_addadmin]]. 
 +
 +
If you choose to use SQL directly (or an interface), you must learn the table layout.  There are four columns, each corresponding to one of the four properties listed above in [[#Adding an Admin]].  For example:
 +
<pre>INSERT INTO admins VALUES("STEAM_0:1:23456", "", "abcdefghijklmnopqrstu", "ce");</pre>
 +
 +
{{qnotice|'''Note:''' It is important that you do not use the 'z' flag for admins.}}
 +
 +
For information on what access levels mean, see [[AMX Mod X Access Levels]].
  
  
  
 
=Plugins=
 
=Plugins=
 +
 +
 
=Modules=
 
=Modules=
 
=CVARs=
 
=CVARs=

Revision as of 13:58, 15 January 2006

Admins (non-SQL)

Adding an Admin

First, open the amxmodx/configs/users.ini file with your favorite text editor. Scroll to the bottom. Admin entries are stored with four options: Authentication, Password, Access Right, Connection Properties.

In the early days of Half-Life 1 it was common to have admins authenticate by name. However, now it is recommended to auth by steamid. An example of a typical admin entry is:

"STEAM_0:0:123456" "" "abcdefghijklmnopqrstu" "ce"

Entries are one-per-line, and each of the four options are space separated, contained in double-quotes. This one means:

  1. The user has SteamID STEAM_0:0:123456
  2. The user has no password (steamid-authentication)
  3. Access rights are levels a through u
  4. The user is a steamid ("c") and has no password ("e")

It is also possible to authenticate by username:

"BAILOPAN" "mypass" "abcdefghijklmnopqrstu" "a"

To authenticate, BAILOPAN would put this in his client's autoexec.cfg, where "_pw" is the value of "amx_password_field" in amxx.cfg.

setinfo "_pw" "mypass"

For information on what access levels mean, see AMX Mod X Access Levels.

Note: Note: It is important that you do not use the 'z' flag for admins.

Removing an Admin

Find the admin's entry in your amxmodx/configs/users.ini file, and put a semicolon in front of it. For example:

;"STEAM_0:0:123456" "" "abcdefghijklmnopqrstu" "ce"

That will prevent the entry from being read.


Admins (SQL)

AMX Mod X lets you store admin accounts in a MySQL database. This is ideal if you have multiple servers with common administrators.

Configuring Server

First, make sure you have mysql_amxx enabled in AMX Mod X's amxmodx/configs/modules.ini file.

Then, open amxmodx/configs/sql.cfg and edit the cvars accordingly:

CVAR Default Setting 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.

Make sure your username and password have access that to the given database and table. Then, open your amxmodx/configs/plugins.ini. Comment out "admin.amxx" and enable "admin_sql.amxx":

;admin.amxx
admin_sql.amxx
...

Maintaining Admins

Once the server loads for the first time, it will automatically create the table specified with amx_sql_table.

You can either add an admin through an SQL tool like an SQL Console or phpMyAdmin, or you can add an admin using amx_addadmin.

If you choose to use SQL directly (or an interface), you must learn the table layout. There are four columns, each corresponding to one of the four properties listed above in #Adding an Admin. For example:

INSERT INTO admins VALUES("STEAM_0:1:23456", "", "abcdefghijklmnopqrstu", "ce");

Note: Note: It is important that you do not use the 'z' flag for admins.

For information on what access levels mean, see AMX Mod X Access Levels.


Plugins

Modules

CVARs

SQL

Maps

Menus

Client Commands

Commands

Configs

Speech