Raised This Month: $51 Target: $400
 12% 

[HOWTO] Compile locally with custom includes


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-24-2010 , 13:41   [HOWTO] Compile locally with custom includes
Reply With Quote #1

For a french version by -Kid-, click Comment compiler en local?
For a dutch version by me, click Compileren met nieuwe includes
For a list with includes, maintained by ANTICHRISTUS, click here.


The first thing you need to do is set everything up.

If you don't have an amxx installation on your pc,
you should start by downloading the latest amxx build here
If you're not planning on setting up amxx on a listen / dedicated server, you can download the base package instead of the installer.
Unzip it and navigate to the scripting folder.
Once there is should look like this.




Now you have to have the code to compile,
We're gonna use a little example that required the colorchat.inc to compile.

PHP 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(0BLUE"Message"); 
Before we start compiling we need to add the colorchat include to the scripting/include folder,
just copy - paste it in there.
Now, drag and drop the *.sma (in my case compiletut.sma) onto compile.exe.
For linux compile.exe is compile.so.

A console window appears with the info about the compilation. (errors, warnings, ...)

If you placed the required include right, it should look like this:



The *.amxx file can now be found in the scripting/compiled folder.



If you didn't place the include right, it looks like this:




If this occurs, check if you pasted the include in the right folder, and if it has the same name
in the script.
Attached Thumbnails
Click image for larger version

Name:	tut1.jpg
Views:	37876
Size:	74.2 KB
ID:	81819   Click image for larger version

Name:	tut2.jpg
Views:	38144
Size:	54.6 KB
ID:	81821   Click image for larger version

Name:	tut3.jpg
Views:	35677
Size:	64.9 KB
ID:	81822  
Attached Files
File Type: sma Get Plugin or Get Source (compiletut.sma - 7708 views - 2.0 KB)
File Type: inc colorchat.inc (2.3 KB, 4491 views)
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.

Last edited by drekes; 04-05-2014 at 10:56.
drekes is offline
Send a message via MSN to drekes
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode