How to compile plugins with AMX and AMX Mod X

Locked
metro
Staff
Staff
Posts: 94
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Mon Dec 08, 2003 11:35 pm
Location: Beaverton, OR

How to compile plugins with AMX and AMX Mod X

Post by metro »

We get a lot of questions about installing plugins, and below is a guide I have put together to assist people with compiling plugins to use on their server. I will list some basic guidelines that will need to be followed in order for the plugin to work. I can't stress enough how these guidelines will be important, because they are accurate for each mod.

1. Use plugins that are written for the correct mod. Certain plugins will only work for certain mods. AMX Mod and AMX Mod X are similar, but vastly different in how the code is organized and written. A lot of AMX plugins will work with AMXx, but only if you use AMXx 0.16, as AMXx 0.20 has a completely different structure and the code is written a little differently. This is why you will see different .sma's for both 0.16 and 0.20 on the AMXx website.

2. Always compile your plugins with the mod you use on the server. Even though the websites have a compiler built into them that will compile the code on the fly, it is best to download the code and compile it yourself. There have been issues with compiled plugins downloaded from the websites in the past. Not only that, but if you get compile errors it will indicate if you are missing any includes the plugin needs. Web based compilers have everything available, so you won't have any leads on the problem unless you follow the important tip at the bottom of this post.

3. Always read the instructions for the plugins. Most advanced plugins come with detailed installation instructions. If you get a plugin that does not have any, then it is best to assume all you need to do is compile, upload, and add the plugin to the plugins.ini and restart the server for it to work. If you are unsure of the commands the plugin uses, then use the amx_help command in-game. It will list available plugin commands for your access level on the server.

AMX Mod
To compile with AMX mod, you will need to download the mod binaries and extract them to a location on your computer. The latest version of AMX is 0.99 but I feel that version still has many problems. I recommend 0.98 which can be obtained here: http://files.nfoe.net/download.php?fnam ... 98_Win.zip

Extract the files to your computer, and browse to the addons\amx\examples folder. This is the folder that you will place all of your .sma source code files. When you have placed the .sma files of the plugins you want, double click the "compile.bat" file. This will open a command prompt that will start the compiling process:

Image

When that is finished, there will be a folder called "compiled" that all of your compiled plugins will be placed into. You would then upload these to your game server's plugins folder for AMX and edit the plugins.ini to reflect the new plugin. When you are done, restart your server.

AMXx 0.16
To compile with AMXx 0.16, you will need to download the mod binaries and extract them to a location on your computer. The latest official release of AMXx is 0.16, but the release of 0.20 is nearby. The folder structure will be the same, but the way plugins are coded will be slightly different. It is important that you do not mix up plugins that are written for 0.16 and 0.20 because they will not work. You can download AMXx 0.16 from here: http://files.nfoe.net/download.php?fnam ... -steam.zip

Extract the files to your computer and browse to the addons\amxx\scripting folder. This is the folder that you will place all of your .sma source code files. When you have placed the .sma files of the plugins you want, double click the "compile.bat" file. This will open a command prompt that will start the compiling process:

Image

When that is finished, there will be a folder called "compiled" that all of your compiled plugins will be placed into. You would then upload these to your game server's plugins folder for AMXx and edit the plugins.ini to reflect the new plugin. When you are done, restart your server.

AMXx 0.20
To compile with AMXx 0.20, you will need to download the mod binaries and extract them to a location on your computer. The latest official release of AMXx 0.20 is RC6, but may change shortly. It is important that you do not mix up plugins that are written for 0.16 and 0.20 because they will not work. You can download AMXx 0.20 from here: http://easynews.dl.sourceforge.net/sour ... 20-RC6.zip

Extract the files to your computer and browse to the addons\amxmodx\scripting folder. This is the folder that you will place all of your .sma source code files. When you have placed the .sma files of the plugins you want, double click the "compile.exe" file. This will open a command prompt that will start the compiling process:

Image

When that is finished, there will be a folder called "compiled" that all of your compiled plugins will be placed into. You would then upload these to your game server's plugins folder for AMXx and edit the plugins.ini to reflect the new plugin. When you are done, restart your server.

Important!
Make sure that all required modules to run your plugins are on the server. If you don't have all of the required modules, you will get bad loads on your plugins and they will not work until you fix this. The best way to check for bad loads is to use HLSW with your server RCON password. Go to the console tab and type "meta list" and press send. This will list all metamod based plugins and all AMX or AMXx modules that are running. To see if there are any bad loads on your plugins, type "amx list" for AMX Mod or "amxx list" for AMX Mod X to check. If there are any bad loads, please consult with the instructions for the plugin or visit the forums where the plugin was posted. You will generally find information there that you can use to get everything working.
Image
metro @ [url=irc://irc.gamesurge.net/nfo-support]#nfo-support[/url]
Somewhere in Texas, a village is missing it's idiot...
User avatar
Nick|NFo
Former staff
Former staff
Posts: 2252
Joined: Sun Mar 30, 2003 1:56 pm
Location: 127.0.0.1

Post by Nick|NFo »

Some other good sites for help are:

http://quake2.telestream.com/amx/amxcompile.php (AMX 0.9.7 NFo's default)

http://amxmod.net/doc/?p=amxcompile (AMX 0.9.9)
-Nick
metro
Staff
Staff
Posts: 94
Joined: Mon Dec 08, 2003 11:35 pm
Location: Beaverton, OR

AMXX 1.0

Post by metro »

For AMXX 1.0 plugin compiles, please use the same instructions for AMXX 0.20 because it will work the same. :)
Image
metro @ [url=irc://irc.gamesurge.net/nfo-support]#nfo-support[/url]
Somewhere in Texas, a village is missing it's idiot...
User avatar
bOoya
Former staff
Former staff
Posts: 886
Joined: Thu Jan 15, 2004 3:46 pm
Location: Corona, CA
Contact:

Post by bOoya »

we've created some easy to use compilers for you. Instructions are included in the zip files:
Locked