This is what my compiletut.sma looks like
/*Hey,
Because i saw many people have trouble with compiling plugins locally and compiling with custom includes
i decided to make a small tutorial about it so we don't have to explain it every time.
Let's get started.
1. Getting the stuff.
NOTE: If you have amxmodx installed on your server, you can find the compiler and the include folder in "addons/amxmodx/scripting"
The first thing we need is the compiler and a plugin.
You can find the compiler and all the original includes here:
http://www.amxmodx.org/downloads.php
I'm gonna use this plugin that uses colorchat. The colorchat include is not included on the webcompiler,
so we are gonna have to compile it locally.
You will also need the custom include. We will use colorchat for now. It's linked on the bottom of the tut.
Code:
*/
#include <amxmodx>
#include <colorchat>
public plugin_init()
{
register_plugin("custom include compiling", "0.1", "Drekes");
set_task(100.0, "TaskShowMsg", .flags = "b");
}
public TaskShowMsg()
ColorChat(0, BLUE, "Message");
2. Installing the include.
It's really simple actually.
- Go to the folder where amxxpc.exe (the compiler) in located.
In that folder will be another folder called "include".
Just put the colorchat.inc file in that folder.
3. Compiling.
If you installed all the includes you need it's time to compile the plugin.
You find the plugin (in my case compiletut.sma) and drag it over compile.exe.
A little windows will pop up telling you that the plugin compiled succesfully if you did everything right.
I hope this helps some people with this problem.
Pictures:
Finding amxxpc.exe
the include folder
You didn't install it right
You installed it right
*/