Difference between revisions of "Configuring AMX Mod X"
(→Map Config Files) |
|||
(38 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
− | =Admins | + | [[Category:Documentation (AMX Mod X)]] |
− | + | {{LanguageSwitch}} | |
+ | |||
+ | |||
+ | =Admins= | ||
+ | See the section on [[Adding Admins (AMX Mod X)|Adding Admins]] for more information. | ||
− | + | =Plugins= | |
− | + | ==Installing== | |
− | + | Often, plugins will have their own directions if they need special installation requirements. However, this will instruct you on the basics of adding a plugin. | |
− | + | #Follow any directions the plugin author has given you. If the plugin requires extra steps or special files, make sure you have them in the proper place and order. | |
− | # | + | #If you are given a .sma source file instead of a .amxx, you must compile the plugin yourself. For more information, see [[Compiling Plugins (AMX Mod X)]]. |
− | # | + | #Place the plugin's .amxx file in the addons/amxmodx/plugins folder. |
− | # | + | #Add the plugin's name to addons\amxmodx\configs\plugins.ini. Example: <pre>myplugin.amxx</pre> |
+ | #Change map or restart the server. If the plugin has any load errors, see [[Troubleshooting AMX Mod X#Plugins|Troubleshooting AMX Mod X]]. | ||
− | + | ==Removing== | |
− | + | #Remove the entry from addons\amxmodx\configs\plugins.ini by deleting it or prepending a semi-colon to comment it out. | |
+ | #Delete any associated files. | ||
− | + | ==Default Plugins== | |
− | + | :{| | |
+ | |- class="t2th" | ||
+ | | Plugin | ||
+ | | Purpose | ||
+ | |- class="t2td" | ||
+ | | admin.amxx | ||
+ | | Administration Base | ||
+ | |- class="t2td" | ||
+ | | admin_sql.amxx | ||
+ | | Administration Base for SQL. Use only one base. | ||
+ | |- class="t2td" | ||
+ | | admincmd.amxx | ||
+ | | Basic administration commands (such as kick/slap). | ||
+ | |- class="t2td" | ||
+ | | adminhelp.amxx | ||
+ | | Help for admin commands. | ||
+ | |- class="t2td" | ||
+ | | adminslots.amxx | ||
+ | | Slot reservation. | ||
+ | |- class="t2td" | ||
+ | | multilingual.amxx | ||
+ | | Multi-Lingual client configuration. | ||
+ | |- class="t2td" | ||
+ | | menufront.amxx | ||
+ | | Front-end for admin menus. | ||
+ | |- class="t2td" | ||
+ | | cmdmenu.amxx | ||
+ | | Command menu for settings. | ||
+ | |- class="t2td" | ||
+ | | plmenu.amxx | ||
+ | | Player menu commands (kick, ban, etc). | ||
+ | |- class="t2td" | ||
+ | | telemenu.amxx | ||
+ | | Teleport Menu (fun module required). | ||
+ | |- class="t2td" | ||
+ | | mapsmenu.amxx | ||
+ | | Maps menu (vote, changeleve, etc). | ||
+ | |- class="t2td" | ||
+ | | adminchat.amxx | ||
+ | | Console-based chat commands. | ||
+ | |- class="t2td" | ||
+ | | antiflood.amxx | ||
+ | | Prevents clients from flooding the say chat. | ||
+ | |- class="t2td" | ||
+ | | scrollmsg.amxx | ||
+ | | Displays a scrolling message. | ||
+ | |- class="t2td" | ||
+ | | imessage.amxx | ||
+ | | Displays a centered, timed information message. | ||
+ | |- class="t2td" | ||
+ | | adminvote.amxx | ||
+ | | Voting commands. | ||
+ | |- class="t2td" | ||
+ | | nextmap.amxx | ||
+ | | Displays next map in the mapcycle. | ||
+ | |- class="t2td" | ||
+ | | mapchooser.amxx | ||
+ | | Allows players to vote for the next map. | ||
+ | |- class="t2td" | ||
+ | | timeleft.amxx | ||
+ | | Displays time left on the current map. | ||
+ | |- class="t2td" | ||
+ | | pausecfg.amxx | ||
+ | | Allows pausing/unpausing of plugins. | ||
+ | |- class="t2td" | ||
+ | | statscfg.amxx | ||
+ | | Configuration of statistical plugins. | ||
+ | |} | ||
− | + | =Modules= | |
+ | Modules add additional functionality for plugins to use. | ||
+ | ==Installing== | ||
+ | #Figure out what operating system your server is: Windows, Linux, or Linux using AMD64 (64bit). | ||
+ | #If the module is 3rd party, download the module corresponding to your OS. It will end in .dll for Windows, _i386.so for Linux, or _amd64.so for AMD64. | ||
+ | #Place the file in addons/amxmodx/modules/ and follow any additional instructions. | ||
+ | #If the module is already in addons/amxmodx/configs/modules.ini, remove the ';' next to its name to enable it. | ||
+ | #Otherwise, add the module's name to modules.ini. [[AMX Mod X]] supports generic notation, for example: <pre>mysql_amxx</pre> ... will automatically detect the correct module to use. | ||
+ | #To see if the module is working, you can type <tt>amxx modules</tt> in your [[server console]]. | ||
− | { | + | ==Removing== |
+ | #Remove the entry from addons\amxmodx\configs\modules.ini by deleting it or prepending a semi-colon to comment it out. | ||
+ | #Delete any associated files if you don't need them. | ||
+ | |||
+ | ==Default Modules== | ||
+ | :{| | ||
+ | |- class="t2th" | ||
+ | | Module | ||
+ | | Purpose | ||
+ | |- class="t2td" | ||
+ | | fun_amxx | ||
+ | | General functions for changing game values. | ||
+ | |- class="t2td" | ||
+ | | engine_amxx | ||
+ | | More advanced functions for getting and setting values in the HL engine. | ||
+ | |- class="t2td" | ||
+ | | fakemeta_amxx | ||
+ | | Expert/advanced functions for manipulating, hooking, and calling functions in the HL engine. | ||
+ | |- class="t2td" | ||
+ | | *sql_amxx | ||
+ | | SQL/Database scripting functions. | ||
+ | |- class="t2td" | ||
+ | | geoip_amxx | ||
+ | | Functions for finding countries by IP address. | ||
+ | |- class="t2td" | ||
+ | | array_amxx | ||
+ | | Functions for somewhat-dynamic arrays. | ||
+ | |- class="t2td" | ||
+ | | sockets_amxx | ||
+ | | Functions for socket (TCP/UDP) control and manipulation. | ||
+ | |- class="t2td" | ||
+ | | regex_amxx | ||
+ | | Functions for regular expression support. | ||
+ | |} | ||
− | |||
− | |||
− | |||
=CVARs= | =CVARs= | ||
+ | The base [[CVAR]]s AMX Mod X defines are located in amxmodx/configs/amxx.cfg. You can edit these the same way you edit the server.cfg file: | ||
+ | :{| | ||
+ | |- class="t2th" | ||
+ | | CVAR | ||
+ | | Default Setting | ||
+ | | Purpose | ||
+ | |- class="t2td" | ||
+ | | amx_default_access | ||
+ | | "z" | ||
+ | | Sets the default access level for non-admin players. | ||
+ | |- class="t2td" | ||
+ | | amx_password_field | ||
+ | | "_pw" | ||
+ | | Name of the setinfo key which a user should store their password in. | ||
+ | |- class="t2td" | ||
+ | | amx_mode | ||
+ | | 1 | ||
+ | | Changes the mode of logging into a server:<br /> | ||
+ | 0 - Disable logging, players won't be checked and no access will be given.<br /> | ||
+ | 1 - Normal mode which obeys flags set in accounts.<br /> | ||
+ | 2 - Kick all players not on the users list. | ||
+ | |- class="t2td" | ||
+ | | amx_show_activity | ||
+ | | 2 | ||
+ | | Sets the mode of admin activity on the server:<br /> | ||
+ | 0 - Disabled<br /> | ||
+ | 1 - Show action anonymously<br /> | ||
+ | 2 - Show action with the admin's name | ||
+ | |- class="t2td" | ||
+ | | amx_scrollmsg | ||
+ | | "Welcome to %hostname% -- This server is using AMX Mod X" 600 | ||
+ | | Sets the parameters (message and frequency) for a scrolling message. | ||
+ | |- class="t2td" | ||
+ | | amx_imessage | ||
+ | | "Welcome to %hostname" "000255100" <br />"This server is using AMX Mod X\nVisit http://www.amxmodx.org" "00010025" | ||
+ | | Adds a center-typed colored message. The last parameter is in RRRGGGBBB format (red, green, blue). | ||
+ | |- class="t2td" | ||
+ | | amx_freq_imessage | ||
+ | | 180 | ||
+ | | Frequency, in seconds, of the colored center messages. | ||
+ | |- class="t2td" | ||
+ | | amx_flood_time | ||
+ | | 0.75 | ||
+ | | Chat flood prevention. Sets how fast a player can chat (in seconds). | ||
+ | |- class="t2td" | ||
+ | | amx_reservation | ||
+ | | 0 | ||
+ | | Sets the amount of reserved slots. | ||
+ | |- class="t2td" | ||
+ | | amx_time_display | ||
+ | | "ab 1200" "ab 600" "ab 300" "ab 180" "ab 60" "bcde 11" | ||
+ | | Sets flags for remaining time display:<br /> | ||
+ | a - Display white text on bottom<br /> | ||
+ | b - Use voice<br /> | ||
+ | c - Don't add "remaining" in voice<br /> | ||
+ | d - Don't add "hours/minutes/seconds" in voice<br /> | ||
+ | e - Show/speak if current time is less than set in parameter | ||
+ | |- class="t2td" | ||
+ | | amx_time_voice | ||
+ | | 1 | ||
+ | | Sets whether to announce "say thetime" and "say timeleft" with voice. | ||
+ | |- class="t2td" | ||
+ | | amx_vote_delay | ||
+ | | 10 | ||
+ | | Sets the minimum delay in seconds between two voting sessions. | ||
+ | |- class="t2td" | ||
+ | | amx_vote_time | ||
+ | | 10 | ||
+ | | Sets how long a voting sessions lasts for. | ||
+ | |- class="t2td" | ||
+ | | amx_vote_answers | ||
+ | | 1 | ||
+ | | Displays who votes for which options, publically. | ||
+ | |- class="t2td" | ||
+ | | amx_voteban_ratio | ||
+ | | 0.40 | ||
+ | | Ratio for a ban vote to be successful. | ||
+ | |- class="t2td" | ||
+ | | amx_votekick_ratio | ||
+ | | 0.40 | ||
+ | | Ratio for a kick vote to be successful. | ||
+ | |- class="t2td" | ||
+ | | amx_votemap_ratio | ||
+ | | 0.40 | ||
+ | | Ratio for a map vote to be successful. | ||
+ | |- class="t2td" | ||
+ | | amx_vote_ratio | ||
+ | | 0.40 | ||
+ | | Ratio for a general vote to be successful. | ||
+ | |- class="t2td" | ||
+ | | amx_extendmap_max | ||
+ | | 90 | ||
+ | | Maximum time a mapvote can be extended. | ||
+ | |- class="t2td" | ||
+ | | amx_extendmap_step | ||
+ | | 15 | ||
+ | | Amount of time a map extensions adds. | ||
+ | |- class="t2td" | ||
+ | | amx_client_languages | ||
+ | | 1 | ||
+ | | Enables or disables the ability for clients to choose their own language. | ||
+ | |- class="t2td" | ||
+ | | amx_debug | ||
+ | | 1 | ||
+ | | Sets the debug mode for plugins:<br /> | ||
+ | 0 - No debugging (warning messages for plugin errors)<br /> | ||
+ | 1 - Plugins with "debug" option in plugins.ini are put into debug mode.<br /> | ||
+ | 2 - All plugins are put into debug mode (full backtraces for errors).<br /> | ||
+ | Note that debug mode greatly decreases JIT performance. | ||
+ | |- class="t2td" | ||
+ | | amx_mldebug | ||
+ | | 0 | ||
+ | | Logs multi-lingual translation problems. | ||
+ | |} | ||
+ | |||
+ | |||
=SQL= | =SQL= | ||
+ | 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: | ||
+ | |||
+ | :{| | ||
+ | |- class="t2th" | ||
+ | | CVAR | ||
+ | | Default Setting | ||
+ | | Purpose | ||
+ | |- class="t2td" | ||
+ | | amx_sql_host | ||
+ | | "127.0.0.1" | ||
+ | | IP address of SQL server. | ||
+ | |- class="t2td" | ||
+ | | amx_sql_user | ||
+ | | "root" | ||
+ | | Username to connect to the SQL server. | ||
+ | |- class="t2td" | ||
+ | | amx_sql_pass | ||
+ | | "" | ||
+ | | Password to connect to the SQL server. | ||
+ | |- class="t2td" | ||
+ | | amx_sql_db | ||
+ | | "amx" | ||
+ | | Database to use on the SQL server. | ||
+ | |- class="t2td" | ||
+ | | amx_sql_table | ||
+ | | "admins" | ||
+ | | The table to use for the admin_sql plugin. | ||
+ | |- class="t2td" | ||
+ | | amx_sql_type | ||
+ | | "mysql" | ||
+ | | The database type to connect to. | ||
+ | |} | ||
+ | *Note: amx_sql_type as of AMXX 1.75 | ||
+ | |||
=Maps= | =Maps= | ||
+ | |||
+ | ==Map Cycle== | ||
+ | If you use the mapsmenu plugin, you can either use "maps.ini" or "mapcycle.txt" to manage map rotations. | ||
+ | |||
+ | Delete "maps.ini" to use mapcycle.txt, otherwise, simply add a list of map names to maps.ini like so: | ||
+ | |||
+ | <pre> | ||
+ | ; Maps configuration file | ||
+ | ; File location: $moddir/addons/amxmodx/configs/maps.ini | ||
+ | ; To use with Maps Menu plugin | ||
+ | |||
+ | ; Add in your mod's maps here | ||
+ | ; Delete this file to use mapcycle.txt | ||
+ | |||
+ | as_oilrig | ||
+ | cs_747 | ||
+ | cs_assault | ||
+ | cs_backalley | ||
+ | cs_estate | ||
+ | cs_havana | ||
+ | cs_italy | ||
+ | cs_militia | ||
+ | cs_office | ||
+ | cs_siege | ||
+ | de_airstrip | ||
+ | de_aztec | ||
+ | de_cbble | ||
+ | de_chateau | ||
+ | de_dust | ||
+ | de_dust2 | ||
+ | de_inferno | ||
+ | de_nuke | ||
+ | de_piranesi | ||
+ | de_prodigy | ||
+ | de_storm | ||
+ | de_survivor | ||
+ | de_torn | ||
+ | de_train | ||
+ | de_vertigo | ||
+ | </pre> | ||
+ | |||
+ | * Note: This is the default maps.ini for the CS package 1.76d | ||
+ | |||
+ | ==Map Config Files== | ||
+ | For each map, you can also add a configuration file that will execute when the map loads. This is useful to set certain settings for 3rd party maps, say, removing the freeze time on fy_iceworld. | ||
+ | |||
+ | To do this, simply create a folder in amxmodx/configs called "maps" and place a .cfg file named after the map with the settings in it, for example, you might have amxmodx/configs/maps/fy_iceworld.cfg: | ||
+ | |||
+ | <pre> | ||
+ | mp_startmoney 16000 | ||
+ | mp_freezetime 0 | ||
+ | mp_timelimit 20 | ||
+ | sv_downloadurl "http://YourFastDownload1.com/cstrike" //for different Download URL other then default | ||
+ | </pre> | ||
+ | |||
+ | Be sure to include the following line into your server.cfg. This ensures that you go back (or fall back on) to your default server settings. It is suggested that anything you place in custom config files are also put in your server.cfg or amxx.cfg (at default settings) for best use of this feature. | ||
+ | |||
+ | <pre> | ||
+ | mapchangecfgfile server.cfg | ||
+ | </pre> | ||
+ | |||
+ | As of [[AMX_Mod_X_1.8.0_Changes|AMX Mod X 1.8.0]], you are now able to create config files for map prefixes. To do this, create a file called prefix_<prefix>.cfg, where <prefix> would mean de, cs, awp, surf, ect. All prefix config files go in the same location as per map, the amxmodx/configs/map/ directory. | ||
+ | |||
+ | <pre> | ||
+ | configs/maps/prefix_de.cfg - Would run on any de_* map. | ||
+ | configs/maps/prefix_cs.cfg - Would run on any cs_* map. | ||
+ | </pre> | ||
+ | |||
+ | Configuration files are map prefix first (prefix_de.cfg) and map configuration second (de_dust2.cfg). | ||
+ | |||
+ | For Counter-Strike, you can restrict certain weapons using these config files. It requires the restmenu.amxx plugin to be enabled on your server (usually is by default). You can find more information on how to do this here. | ||
+ | |||
+ | http://forums.alliedmods.net/showthread.php?t=6516 | ||
+ | |||
+ | ==Map Specific Plugins== | ||
+ | Each map can have a specific plugins.ini file for which it will load on map change. This plugins file will be loaded in addition to the standard plugins.ini file. | ||
+ | |||
+ | The file is to be located at ''amxmodx/configs/maps/plugins-mapname.ini'' For example, for de_dust you would create the file '''amxmodx/configs/maps/plugins-de_dust.ini''' | ||
+ | |||
+ | In addition, a plugin can be tagged as "''disabled''" which will prevent this plugin from being loaded. You accomplish this the same way you tag a plugin as debug mode, by entering the word ''disabled'' after the plugin name in the file, which will prevent it from being loaded for that map. | ||
+ | |||
+ | For example, if you wanted the map de_dust to disable the plugin ''ham.amxx'' and enable the plugin ''pickle.amxx'' you would put this in ''amxmodx/configs/maps/plugins-de_dust.ini'': | ||
+ | |||
+ | <pre> | ||
+ | ham.amxx disabled | ||
+ | pickle.amxx | ||
+ | </pre> | ||
+ | |||
+ | '''Note:''' This feature was added in [[AMX_Mod_X_1.76_Changes|AMX Mod X 1.76]] | ||
+ | |||
+ | As of [[AMX_Mod_X_1.8.0_Changes|AMX Mod X 1.8.0]], you are now able to create plugin.ini files for map prefixes. To do this, create a file called plugins-<prefix>.ini, where <prefix> would mean de, cs, awp, surf, ect. All prefix config files go in the same location as per map, the amxmodx/configs/map/ directory. | ||
+ | |||
+ | <pre> | ||
+ | configs/maps/plugins-de.ini - Would enable/disable any plugins for all de_* maps. | ||
+ | </pre> | ||
+ | |||
+ | Plugin based configuration files are loaded by map first (plugins-de_nuke.ini) and prefix second (plugins-de.ini). | ||
+ | |||
=Menus= | =Menus= | ||
==Client Commands== | ==Client Commands== | ||
+ | :{| | ||
+ | |- | ||
+ | | class="t2th" | File: | ||
+ | | class="t2td" | addons\amxmodx\configs\clcmds.ini | ||
+ | |- | ||
+ | | class="t2th" | Format: | ||
+ | | class="t2td" | "Name" "Command" "Flags" "Access Level" | ||
+ | |- | ||
+ | | class="t2th" | Options: | ||
+ | | class="t2td" | Name is the name that will appear on the menu.<br /> | ||
+ | Command is the format for the console command - you can use %userid% to insert the user's id.<br /> | ||
+ | Flags are one of the following:<br /> | ||
+ | a - execute from server console.<br /> | ||
+ | b - execute from admin console.<br /> | ||
+ | c - execute on selected player.<br /> | ||
+ | d - display menu again once done | ||
+ | |- | ||
+ | | class="t2th" | Example: | ||
+ | | class="t2td" | "Slay player" "amx_slay #%userid%" "bd" "u" | ||
+ | |} | ||
+ | |||
==Commands== | ==Commands== | ||
+ | :{| | ||
+ | |- | ||
+ | | class="t2th" | File: | ||
+ | | class="t2td" | addons\amxmodx\configs\cmds.ini | ||
+ | |- | ||
+ | | class="t2th" | Format: | ||
+ | | class="t2td" | "Name" "Command" "Flags" "Access Level" | ||
+ | |- | ||
+ | | class="t2th" | Options: | ||
+ | | class="t2td" | Name is the name that will appear on the menu.<br /> | ||
+ | Command is the format for the console command - you can use %userid% to insert the user's id.<br /> | ||
+ | Flags are one of the following:<br /> | ||
+ | a - execute from server console.<br /> | ||
+ | b - execute from admin console.<br /> | ||
+ | c - execute on selected player.<br /> | ||
+ | d - display menu again once done | ||
+ | |- | ||
+ | | class="t2th" | Example: | ||
+ | | class="t2td" | "Pause" "amx_pause" "bd" "u" | ||
+ | |} | ||
+ | |||
==Configs== | ==Configs== | ||
− | == | + | :{| |
+ | |- | ||
+ | | class="t2th" | File: | ||
+ | | class="t2td" | addons\amxmodx\configs\configs.ini | ||
+ | |- | ||
+ | | class="t2th" | Format: | ||
+ | | class="t2td" | "Name" "Command" "Flags" "Access Level" | ||
+ | |- | ||
+ | | class="t2th" | Options: | ||
+ | | class="t2td" | Name is the name that will appear on the menu.<br /> | ||
+ | Command is the format for the console command. | ||
+ | Flags are one of the following:<br /> | ||
+ | a - execute from server console.<br /> | ||
+ | b - execute from admin console.<br /> | ||
+ | d - display menu again once done | ||
+ | |- | ||
+ | | class="t2th" | Example: | ||
+ | | class="t2td" | "PUBLIC Settings" "servercfgfile server.cfg;exec server.cfg" "a" "u" | ||
+ | |} | ||
+ | ==CVARs== | ||
+ | :{| | ||
+ | |- | ||
+ | | class="t2th" | File: | ||
+ | | class="t2td" | addons\amxmodx\configs\cvars.ini | ||
+ | |- | ||
+ | | class="t2th" | Format: | ||
+ | | class="t2td" | "CVAR" "Values" ... "Access Level" | ||
+ | |- | ||
+ | | class="t2th" | Options: | ||
+ | | class="t2td" | CVAR - the CVAR's name<br /> | ||
+ | Values - list of space delimited, quotation enclosed values | ||
+ | |- | ||
+ | | class="t2th" | Example: | ||
+ | | class="t2td" | "mp_autoteambalance" "0" "1" "@" "u" | ||
+ | |} | ||
− | + | ==Speech== | |
+ | :{| | ||
+ | |- | ||
+ | | class="t2th" | File: | ||
+ | | class="t2td" | addons\amxmodx\configs\speech.ini | ||
+ | |- | ||
+ | | class="t2th" | Format: | ||
+ | | class="t2td" | "Name" "Command" "Flags" "Access Level" | ||
+ | |- | ||
+ | | class="t2th" | Options: | ||
+ | | class="t2td" | Name is the name that will appear on the menu.<br /> | ||
+ | Command is the format for the console command - you can use %userid% to insert the user's id.<br /> | ||
+ | Flags are one of the following:<br /> | ||
+ | a - execute from server console<br /> | ||
+ | b - execute from admin console<br /> | ||
+ | c - execute on selected player<br /> | ||
+ | d - display menu again once done | ||
+ | |- | ||
+ | | class="t2th" | Example: | ||
+ | | class="t2td" | "Hello!" "spk \'vox/hello\'" "cd" "u" | ||
+ | |} |
Latest revision as of 23:34, 25 June 2009
Warning: This template (and by extension, language format) should not be used, any pages using it should be switched to Template:Languages | |
View this page in: English Russian 简体中文(Simplified Chinese) |
Contents
Admins
See the section on Adding Admins for more information.
Plugins
Installing
Often, plugins will have their own directions if they need special installation requirements. However, this will instruct you on the basics of adding a plugin.
- Follow any directions the plugin author has given you. If the plugin requires extra steps or special files, make sure you have them in the proper place and order.
- If you are given a .sma source file instead of a .amxx, you must compile the plugin yourself. For more information, see Compiling Plugins (AMX Mod X).
- Place the plugin's .amxx file in the addons/amxmodx/plugins folder.
- Add the plugin's name to addons\amxmodx\configs\plugins.ini. Example:
myplugin.amxx
- Change map or restart the server. If the plugin has any load errors, see Troubleshooting AMX Mod X.
Removing
- Remove the entry from addons\amxmodx\configs\plugins.ini by deleting it or prepending a semi-colon to comment it out.
- Delete any associated files.
Default Plugins
Plugin Purpose admin.amxx Administration Base admin_sql.amxx Administration Base for SQL. Use only one base. admincmd.amxx Basic administration commands (such as kick/slap). adminhelp.amxx Help for admin commands. adminslots.amxx Slot reservation. multilingual.amxx Multi-Lingual client configuration. menufront.amxx Front-end for admin menus. cmdmenu.amxx Command menu for settings. plmenu.amxx Player menu commands (kick, ban, etc). telemenu.amxx Teleport Menu (fun module required). mapsmenu.amxx Maps menu (vote, changeleve, etc). adminchat.amxx Console-based chat commands. antiflood.amxx Prevents clients from flooding the say chat. scrollmsg.amxx Displays a scrolling message. imessage.amxx Displays a centered, timed information message. adminvote.amxx Voting commands. nextmap.amxx Displays next map in the mapcycle. mapchooser.amxx Allows players to vote for the next map. timeleft.amxx Displays time left on the current map. pausecfg.amxx Allows pausing/unpausing of plugins. statscfg.amxx Configuration of statistical plugins.
Modules
Modules add additional functionality for plugins to use.
Installing
- Figure out what operating system your server is: Windows, Linux, or Linux using AMD64 (64bit).
- If the module is 3rd party, download the module corresponding to your OS. It will end in .dll for Windows, _i386.so for Linux, or _amd64.so for AMD64.
- Place the file in addons/amxmodx/modules/ and follow any additional instructions.
- If the module is already in addons/amxmodx/configs/modules.ini, remove the ';' next to its name to enable it.
- Otherwise, add the module's name to modules.ini. AMX Mod X supports generic notation, for example:
mysql_amxx
... will automatically detect the correct module to use. - To see if the module is working, you can type amxx modules in your server console.
Removing
- Remove the entry from addons\amxmodx\configs\modules.ini by deleting it or prepending a semi-colon to comment it out.
- Delete any associated files if you don't need them.
Default Modules
Module Purpose fun_amxx General functions for changing game values. engine_amxx More advanced functions for getting and setting values in the HL engine. fakemeta_amxx Expert/advanced functions for manipulating, hooking, and calling functions in the HL engine. *sql_amxx SQL/Database scripting functions. geoip_amxx Functions for finding countries by IP address. array_amxx Functions for somewhat-dynamic arrays. sockets_amxx Functions for socket (TCP/UDP) control and manipulation. regex_amxx Functions for regular expression support.
CVARs
The base CVARs AMX Mod X defines are located in amxmodx/configs/amxx.cfg. You can edit these the same way you edit the server.cfg file:
CVAR Default Setting Purpose amx_default_access "z" Sets the default access level for non-admin players. amx_password_field "_pw" Name of the setinfo key which a user should store their password in. amx_mode 1 Changes the mode of logging into a server:
0 - Disable logging, players won't be checked and no access will be given.
1 - Normal mode which obeys flags set in accounts.
2 - Kick all players not on the users list.amx_show_activity 2 Sets the mode of admin activity on the server:
0 - Disabled
1 - Show action anonymously
2 - Show action with the admin's nameamx_scrollmsg "Welcome to %hostname% -- This server is using AMX Mod X" 600 Sets the parameters (message and frequency) for a scrolling message. amx_imessage "Welcome to %hostname" "000255100"
"This server is using AMX Mod X\nVisit http://www.amxmodx.org" "00010025"Adds a center-typed colored message. The last parameter is in RRRGGGBBB format (red, green, blue). amx_freq_imessage 180 Frequency, in seconds, of the colored center messages. amx_flood_time 0.75 Chat flood prevention. Sets how fast a player can chat (in seconds). amx_reservation 0 Sets the amount of reserved slots. amx_time_display "ab 1200" "ab 600" "ab 300" "ab 180" "ab 60" "bcde 11" Sets flags for remaining time display:
a - Display white text on bottom
b - Use voice
c - Don't add "remaining" in voice
d - Don't add "hours/minutes/seconds" in voice
e - Show/speak if current time is less than set in parameteramx_time_voice 1 Sets whether to announce "say thetime" and "say timeleft" with voice. amx_vote_delay 10 Sets the minimum delay in seconds between two voting sessions. amx_vote_time 10 Sets how long a voting sessions lasts for. amx_vote_answers 1 Displays who votes for which options, publically. amx_voteban_ratio 0.40 Ratio for a ban vote to be successful. amx_votekick_ratio 0.40 Ratio for a kick vote to be successful. amx_votemap_ratio 0.40 Ratio for a map vote to be successful. amx_vote_ratio 0.40 Ratio for a general vote to be successful. amx_extendmap_max 90 Maximum time a mapvote can be extended. amx_extendmap_step 15 Amount of time a map extensions adds. amx_client_languages 1 Enables or disables the ability for clients to choose their own language. amx_debug 1 Sets the debug mode for plugins:
0 - No debugging (warning messages for plugin errors)
1 - Plugins with "debug" option in plugins.ini are put into debug mode.
2 - All plugins are put into debug mode (full backtraces for errors).
Note that debug mode greatly decreases JIT performance.amx_mldebug 0 Logs multi-lingual translation problems.
SQL
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. amx_sql_type "mysql" The database type to connect to.
- Note: amx_sql_type as of AMXX 1.75
Maps
Map Cycle
If you use the mapsmenu plugin, you can either use "maps.ini" or "mapcycle.txt" to manage map rotations.
Delete "maps.ini" to use mapcycle.txt, otherwise, simply add a list of map names to maps.ini like so:
; Maps configuration file ; File location: $moddir/addons/amxmodx/configs/maps.ini ; To use with Maps Menu plugin ; Add in your mod's maps here ; Delete this file to use mapcycle.txt as_oilrig cs_747 cs_assault cs_backalley cs_estate cs_havana cs_italy cs_militia cs_office cs_siege de_airstrip de_aztec de_cbble de_chateau de_dust de_dust2 de_inferno de_nuke de_piranesi de_prodigy de_storm de_survivor de_torn de_train de_vertigo
- Note: This is the default maps.ini for the CS package 1.76d
Map Config Files
For each map, you can also add a configuration file that will execute when the map loads. This is useful to set certain settings for 3rd party maps, say, removing the freeze time on fy_iceworld.
To do this, simply create a folder in amxmodx/configs called "maps" and place a .cfg file named after the map with the settings in it, for example, you might have amxmodx/configs/maps/fy_iceworld.cfg:
mp_startmoney 16000 mp_freezetime 0 mp_timelimit 20 sv_downloadurl "http://YourFastDownload1.com/cstrike" //for different Download URL other then default
Be sure to include the following line into your server.cfg. This ensures that you go back (or fall back on) to your default server settings. It is suggested that anything you place in custom config files are also put in your server.cfg or amxx.cfg (at default settings) for best use of this feature.
mapchangecfgfile server.cfg
As of AMX Mod X 1.8.0, you are now able to create config files for map prefixes. To do this, create a file called prefix_<prefix>.cfg, where <prefix> would mean de, cs, awp, surf, ect. All prefix config files go in the same location as per map, the amxmodx/configs/map/ directory.
configs/maps/prefix_de.cfg - Would run on any de_* map. configs/maps/prefix_cs.cfg - Would run on any cs_* map.
Configuration files are map prefix first (prefix_de.cfg) and map configuration second (de_dust2.cfg).
For Counter-Strike, you can restrict certain weapons using these config files. It requires the restmenu.amxx plugin to be enabled on your server (usually is by default). You can find more information on how to do this here.
http://forums.alliedmods.net/showthread.php?t=6516
Map Specific Plugins
Each map can have a specific plugins.ini file for which it will load on map change. This plugins file will be loaded in addition to the standard plugins.ini file.
The file is to be located at amxmodx/configs/maps/plugins-mapname.ini For example, for de_dust you would create the file amxmodx/configs/maps/plugins-de_dust.ini
In addition, a plugin can be tagged as "disabled" which will prevent this plugin from being loaded. You accomplish this the same way you tag a plugin as debug mode, by entering the word disabled after the plugin name in the file, which will prevent it from being loaded for that map.
For example, if you wanted the map de_dust to disable the plugin ham.amxx and enable the plugin pickle.amxx you would put this in amxmodx/configs/maps/plugins-de_dust.ini:
ham.amxx disabled pickle.amxx
Note: This feature was added in AMX Mod X 1.76
As of AMX Mod X 1.8.0, you are now able to create plugin.ini files for map prefixes. To do this, create a file called plugins-<prefix>.ini, where <prefix> would mean de, cs, awp, surf, ect. All prefix config files go in the same location as per map, the amxmodx/configs/map/ directory.
configs/maps/plugins-de.ini - Would enable/disable any plugins for all de_* maps.
Plugin based configuration files are loaded by map first (plugins-de_nuke.ini) and prefix second (plugins-de.ini).
Menus
Client Commands
File: addons\amxmodx\configs\clcmds.ini Format: "Name" "Command" "Flags" "Access Level" Options: Name is the name that will appear on the menu.
Command is the format for the console command - you can use %userid% to insert the user's id.
Flags are one of the following:
a - execute from server console.
b - execute from admin console.
c - execute on selected player.
d - display menu again once doneExample: "Slay player" "amx_slay #%userid%" "bd" "u"
Commands
File: addons\amxmodx\configs\cmds.ini Format: "Name" "Command" "Flags" "Access Level" Options: Name is the name that will appear on the menu.
Command is the format for the console command - you can use %userid% to insert the user's id.
Flags are one of the following:
a - execute from server console.
b - execute from admin console.
c - execute on selected player.
d - display menu again once doneExample: "Pause" "amx_pause" "bd" "u"
Configs
File: addons\amxmodx\configs\configs.ini Format: "Name" "Command" "Flags" "Access Level" Options: Name is the name that will appear on the menu.
Command is the format for the console command. Flags are one of the following:
a - execute from server console.
b - execute from admin console.
d - display menu again once doneExample: "PUBLIC Settings" "servercfgfile server.cfg;exec server.cfg" "a" "u"
CVARs
File: addons\amxmodx\configs\cvars.ini Format: "CVAR" "Values" ... "Access Level" Options: CVAR - the CVAR's name
Values - list of space delimited, quotation enclosed values
Example: "mp_autoteambalance" "0" "1" "@" "u"
Speech
File: addons\amxmodx\configs\speech.ini Format: "Name" "Command" "Flags" "Access Level" Options: Name is the name that will appear on the menu.
Command is the format for the console command - you can use %userid% to insert the user's id.
Flags are one of the following:
a - execute from server console
b - execute from admin console
c - execute on selected player
d - display menu again once doneExample: "Hello!" "spk \'vox/hello\'" "cd" "u"