|
|
Line 1: |
Line 1: |
− | =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:
| |
− | <pre>"STEAM_0:0:123456" "" "abcdefghijklmnopqrstu" "ce"</pre>
| |
− | Entries are one-per-line, and each of the four options are space separated, contained in double-quotes. This one means:
| |
− | #The user has [[SteamID]] STEAM_0:0:123456
| |
− | #The user has no password (steamid-authentication)
| |
− | #Access rights are levels <tt>a</tt> through <tt>u</tt>
| |
− | #The user is a steamid ("c") and has no password ("e")
| |
| | | |
− | It is also possible to authenticate by username:
| + | =Plugins= |
− | <pre>"BAILOPAN" "mypass" "abcdefghijklmnopqrstu" "a"</pre>
| |
| | | |
− | To authenticate, BAILOPAN would put this in his client's autoexec.cfg, where "_pw" is the value of "amx_password_field" in [[amxx.cfg]].
| |
− | <pre>setinfo "_pw" "mypass"</pre>
| |
| | | |
− | For information on what access levels mean, see [[AMX Mod X Access Levels]].
| + | =Modules= |
− | | + | =CVARs= |
− | {{qnotice|'''Note:''' It is important that you do not use the 'z' flag for admins.}}
| + | =SQL= |
− | | + | Make sure you have mysql_amxx enabled in AMX Mod X's amxmodx/configs/modules.ini file. |
− | ==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)= | |
− | 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: | | Then, open amxmodx/configs/sql.cfg and edit the cvars accordingly: |
Line 63: |
Line 38: |
| |} | | |} |
| | | |
− | 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=
| |
− |
| |
− |
| |
− | =Modules=
| |
− | =CVARs=
| |
− | =SQL=
| |
| =Maps= | | =Maps= |
| =Menus= | | =Menus= |