• AMX Guide Home
  • Step 1: Installing AMX
  • Step 2: Enabling AMX
  • Step 3: Configuring AMX
  • AMX by File:
    • amx.cfg
    • mysql.cfg
    • clcmds.ini
    • cmds.ini
    • configs.ini
    • cvars.ini
    • maps.ini
    • modules.ini
    • paths.ini
    • plugins.ini
    • speech.ini
    • users.ini
  • AMX by Topic:
    • Creating Admins
    • Commands Guide
    • Plugin Installation
    • Plugin Compiling
    • Module Setup
    • Menu Use
    • Language Setup
    • Language Install
    • Weapon Restriction
    • Stats Setup
    • Custom Map Configs
  • Misc. Resources
  • Credit
AMX Mod 2005v1.0 Setup Guide
Half-Life server administration

Compiling plugins

This section describes how to compile plugins yourself. This is sometimes useful if you find a plugin that is only offered as source code, or if an update to AMX requires that your plugins be recompiled using the current release.

Compiling under Windows:

  • Find a plugin you want to add to your server. They can be found here with their source.
  • Each post is for a different plugin. Download the zip file (or .smaCan't see the file extension?

    Open My Computer > Tools menu > Folder Options > View tab > uncheck Hide file extensions for known file types then re-check the file name.
    if no zip is provided) for the plugin you want and extract the file with the .smaCan't see the file extension?

    Open My Computer > Tools menu > Folder Options > View tab > uncheck Hide file extensions for known file types then re-check the file name.
    extension from the zip and save it to the addons\amx\examples\source folder.
  • In the parent folder ('examples'), you will see a file called compile.bat (MS-DOS Batch file). Run it. As the plugin compiles you will see a DOS window pop up and with luck, you will see this:
    ********************
    * AMX MOD COMPILER *
    ********************

    Warnings/Errors:

    Press any key to continue . . .

If you see that, then success! You will find the compiled plugin in the amx\examples\compiled folder now with a .amx extension. Now install the plugin by moving it to your addons\amx\plugins folder and making the appropriate edit to your plugins.ini file. If you received errors or warnings when compiling, check out the tips section below.

Alternatively you can drag the .smaCan't see the file extension?

Open My Computer > Tools menu > Folder Options > View tab > uncheck Hide file extensions for known file types then re-check the file name.
files onto the compile_drag&drop.bat for quick plugin compiles. It will create the compiled plugin with a .amx extension in the examples folder.

Compiling under Linux:

  • Find a plugin you want to add to your server. They can be found here with their source.
  • Each post is for a different plugin. Download the zip file (or .sma if no zip is provided) for the plugin you want and extract the file with the .sma extension from the zip and save it to the addons\amx\examples\source folder.
  • You will see an executable file called sc in the addons/amx/examples folder. To compile your plugin, do this:
    ./sc source/afk_manager.sma
    Then you should see this:
    Small compiler 2.7.3        Copyright (c) 1997-2005, ITB CompuPhase

If you see that, then success! You will find the compiled plugin in the amx\examples\compiled folder now with a .amx extension. Now install the plugin by moving it to your addons\amx\plugins folder and making the appropriate edit to your plugins.ini file. If you received errors or warnings when compiling, check out the tips section below.

Note: you can also use the provided Shell script ./compile to get all your plugins compiled at once. They will be placed in the amx/examples/compiled folder.

Tips for compiling plugins:

  • Pay attention to comments in source. Most of the time, how the plugin works and the valid commands for it are in the top of the source code.
  • It may be necessary to create new .cfg or .ini files or folders for your plugin to work, so read up on how the plugin works in the source and in the thread it's posted in.
  • Warnings are not errors. If you see plugin_name.sma(51) : warning 217: loose indentation, you can safely ignore this.
  • Notepad works as long as you are aware of what it is capable of. Some versions insist on making the extension of a saved file .txt. You can save a file with .smaCan't see the file extension?

    Open My Computer > Tools menu > Folder Options > View tab > uncheck Hide file extensions for known file types then re-check the file name.
    in the extension, but Notepad may actually save it plugin_name.sma.txt. And since the Windows default is not to show you file extensions, it may not be obvious to you what is happening.
  • Some plugins require additional modules to run. Again, pay attention to the source and the thread the plugin is posted in. The popular VexdUM module has been included within the AMX default packages since v0.9.9.
Half-Life is a registered trademark of VALVe Software and Sierra
AMX Mod was created by OLO and is not affiliated with VALVe.