Compile
If you download a custom plugin from ascript, you might have noticed that only a file with suffix .sma is provided and not the needed file with suffix .amx.
.sma is the source code file. This means, you can open it with any text editor and see what the author of that plugin intends to do. For most people this is of no use of course, but that way you can check for any abusive code.
.amx is the compiled source code, which you can load as a plugin on your hl server.
So, you got a sma file? What to do now?
First of all you need a compiler. This compiler is shipped with any admin mod version. So, you just download admin mod for windows to your computer. If you run a linux server AND have ssh access you can download the linux version to server as an alternative, but you are also doing fine with the first option.
Unzip admin mod to any directory you like (hl or steam directory is NOT recommended). Change to the unzipped directory "scripting/myscripts". This directory is meant for your source code plugins (sma). Two files should be already inside. For windows this should be compile.bat and compile_all.bat, for linux compile and compile_all.
To compile single plugins you need to open the command line or shell and type
"compile.bat plugin_xxx.sma" (for windows)
or
"./compile plugin_xxx.sma" (for linux)
where plugin_xxx.sma is a place holder for your plugin.
Ok, this could be uncomfortable. As the compile process is quite quick, you can compile all plugins at once (doubleclick in windows).
"compile_all.bat" (for windows)
or
"./compile_all" (for linux)
Unless you get no errors (I said errors NOT warnings!) you can head to the directory "scripting/mybinaries" and get the compiled plugins (amx).
Convert
Ok, now you got your plugins. Supposing you compiled your plugins in windows and you are running a linux server, it is recommended to convert the plugins to linux as your plugins where compiled for the use with the windows version of admin mod. Since admin mod 2.50.56 plugins for the wrong operating system are converted on-the-fly at mapchange, but this is done at every mapchange. So we recommend to convert it once before. You can get the converter tools from our website.
If you want to use the command line tools, just copy them to the "scripting/mybinaries" directory and execute
"amxconvert.exe plugin_xxx.amx" (for windows)
or
"./amxconvert plugin_xxx.amx" (for linux)
There is also a version with a graphical user interface (gui).
Installation
That's it! Just copy/upload them and edit the plugin.ini as usual.
Always remember that there is a manual telling you how to do things
-[ Black Knight ]-
|