AMX Mod Setup Guide
Half-Life server administration by OLO

# plugins.ini - Adding more plugins

The plugins.ini file in your addons\amx\config folder is the list of what plugins are run in your server. See below how to edit this file and add or remove plugins from your server. This is what the default plugins.ini looks like:

; AMX Mod plugins
; To disable any plugin, add a semi-colon ';' to the beginning of its line
; You can disable the Just-In-Time (JIT) compiler with the 'nojit' keyword:
; pluginname.amx nojit
; (read the docs for more details)
; Note: you don't need to declare csstats.amx here (CSStats will load it)
language.amx ; language management
admin.amx ; admin base (required for any admin-related)
;admin_mysql.amx ; admin base - MySQL version (comment admin.amx)
admincmd.amx ; basic admin console commands
adminhelp.amx ; help command for admin console commands
adminslots.amx ; slot reservation
menufront.amx ; front-end for admin menus
cmdmenu.amx ; command menu (speech, settings)
plmenu.amx ; players menu (kick, ban, client cmds.)
restmenu.amx ; restrict weapons menu
mapsmenu.amx ; maps menu (vote, changelevel)
antiflood.amx ; prevent clients from chat-flooding the server
adminchat.amx ; console chat commands
adminvote.amx ; vote commands
nextmap.amx ; displays next map in mapcycle
timeleft.amx ; displays time left on map
mapchooser.amx ; allows to vote for next map
scrollmsg.amx ; displays a scrolling message
imessage.amx ; displays information messages
welcomemsg.amx ; console motd @ client connection
statsx.amx ; stats on death or round end (CSStats Module required!)
stats_logging.amx ; weapons stats logging (CSStats Module required!)
telemenu.amx ; teleport menu (Fun Module required!)
miscstats.amx ; bunch of events announcement for Counter-Strike
pausecfg.amx ; allows to pause and unpause some plugins
statscfg.amx ; allows to manage stats plugins via menu and commands
; Add custom plugins below

## About the JIT:

The Just-In-Time compiler has been introduced in AMX 0.9.9. It allows 10+ times faster plugin execution.

For the curious ones that would wonder how it works: your .sma plugins are compiled to .amx files with the sc compiler. The .amx files are Abstract Machine eXecutables: they contain bytecode (instructions that has to be interpreted). Before AMX Mod 0.9.9, the only way to run plugins was to interpret their bytecode constantly, and this was consuming much resources. Now thanks to the JIT, the .amx plugins are compiled at load time to instructions that can be sent directly to the processor, no longer needing the (slow) interpreter. Plugins run faster, and your server will no longer suffer high stress when you declare many.

By default, AMX Mod tries to load plugins with the JIT. You can control this thanks to the amx_usejit localinfo (add +localinfo amx_usejit value to the command launching your server).

There are three possible values for this localinfo:

- never: the JIT will never be used, all plugins will be run the old way
- config (default): the JIT will try to run all your plugins
  You can ask AMX not to run the JIT on a specific plugin by adding the nojit keyword right after its line in your plugins.ini file:
  myplugin.amx nojit ; This is my plugin, I don't want the JIT for it
- always: AMX will try to run all your plugins with the JIT, ignoring the nojit keywords you could have specified in your plugins.ini

Anyway, if the JIT compiler fails for some reason on a plugin, that one will be executed the old way.

Now there are two ways you can add plugins to your server:

## Download pre-compiled plugins:

Then copy the .amx file to your addons\amx\plugins folder and add the line for that plugin to your plugins.ini file. Here are a few reasons this is not the best way:

- The compiled plugin needs to be compiled to your version of AMX or it may not work.
- When you upgrade AMX you should recompile all your plugins anyway.
- You should know how to compile plugins, its very easy and many edits can be made by non programmers such as myself.
- You'll never know if someone decides to be hax0rish and gives you a plugin with malicious code in it.

## Download the source and compile it:

(Click here to learn how to compile!)

Then copy the .amx file to your addons\amx\plugins folder and add the line for that plugin to your plugins.ini file. Here are a few reasons this is the best way:

- You can edit the level of access to your choosing.
- Many other people have seen the code and may have offered improvements and can see if the plugin is malicious.
- It lets you learn a little bit more about the overall scheme of how AMX works. And that may come in handy.

## Actually doing it:

There are literally hundreds of plugins that can be downloaded and installed into AMX to make it do many things. Here are a couple places to go and get more plugins:

- The official AMX Mod plugins page
- Newly released plugins forum

So go to one of those two links and find a plugin that you must have. It's a good idea at this point just to do one and will be less of a headache this way if you have trouble. Let's say you have a plugin called amx_gag.amx. This is what it would look like if it was in the plugins.ini file.

;; Custom plugs for my server
amx_gag.amx ; admin gag (admins can gag players)

I started a new section for any plugins that I added and left the default plugin section alone. Now to test and see if the plugin you added is installed and running, start up your server. In the servers console type amx plugins. You should get something like this:

Currently loaded plugins:
name version author file status
[ 1] Admin Base 0.9.9 default admin.amx running
[ 2] Admin Commands 0.9.9 default admincmd.amx running
[ 3] Admin Help 0.9.9 tcquest78 adminhelp.amx running
[ 4] Slots Reservation 0.9.9 default adminslots.amx running
(etc, etc. Not all plugins shown)
[ 24] Admin gag 0.6 default amx_gag.amx running

## Trouble shooting:

If you see something like bad load under status or unknown under name while doing amx plugins, or [AMX] Plugin file open error (plugin "some_plugin.amx") while your server was starting up then possibly:

- the plugin wasn't copied to the addons\amx\plugins folder
- the name of the plugin doesn't match what you typed in the plugins.ini file.

AMX can also display [AMX] Function not found (name "some_function") (plugin "some_plugin.amx") at startup, then the problem is that the plugin requires a certain AMX Mod module to be loaded.

Half-Life is a registered trademark of VALVe Software and Sierra
AMX Mod was created by OLO and is not affiliated with VALVe.