04.07.2016, 13:41
(
Last edited by Fratello; 24/08/2017 at 04:47 PM.
)

I present you little tutorial, it might be useless to you, but it saved many accounts.
So, what are we talking about?
We are talking about custom includes, this is also good for keeping your script secured.
You all probablly know include "a_samp".
What custom include does?
• Secure your gamemode.
• Makes script clean.
n1. Script will load little little little bit faster then ususal.
n2. If you upload .pwn file to host, or to a friend, he won't be able to recomplie it becouse you got all includes.
n3. It's much easy to see script and find everything.
Let's talk more about n2.
Your friend ask you to give him .pwn file so he can uplaod to host, if he want to steal it, he won't be able, Custom includes are defined in your Server folder, he cannot make gamemode working becouse half of script isn't there.
This is also good for hosts, don't beleve them? Just upload .amx script without pawno (no, you don't need pawno folder to make gm working ( IN HOST )) and they won't be able to steal it.
How to make custom include?
• Go into your gamemode by pawno.
{
// We will now make custom include
Notice* Every custom inc is reading from pawno/include ..
So, go into your pawno folder, include, create new folder, name is as you want, but remember it.
Second, go into that folder, make .txt file and open it, now it depends what you wanna keep in there, defines, some system etc, i'll use color.
HTML Code:
#define White 0xFFFFFF
Now click save as and save it as you wanna, but remember this, on bottom box it will show format txt, change to all then save it as YOURNAME.inc, Done.
Go back to script then just do
HTML Code:
#include <YOUR_FOLDER_NAME/YOUR_INC_NAME>
It's done, you can enjoy your new include.
If you got error cannot read from your include, try putting sscanf, or checking did you made everything working.
I'm sorry if there is any error in grammar, I wanted to make it faster as i could.
This saved my scrpt from many hosts, and from friends.
This was my first tutorial on SAMP, i'll learn from mistakes
