[Tutorial] [TUTORIAL/SAMP_INC]
#1

Hellou everyone! I'm Fratello

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
Notice* Since a_samp is loaded, and gamemode is loaded, no need for public.
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
Reply
#2

*sigh*
Reply
#3

It's bad? Huh.
Reply
#4

Maybe it's better to do script without file pwn xD
https://www.youtube.com/watch?v=jJoUDkYwfWY
Reply
#5

Haha. It's generaly for securing script, I wanted to share it with memebers hoping that someone evades what i coudn't, that's all.
Reply
#6

To protect amx file recommend this include:
https://sampforum.blast.hk/showthread.php?tid=600408
Reply
#7

Quote:
Originally Posted by Fratello
View Post
Haha. It's generaly for securing script, I wanted to share it with memebers hoping that someone evades what i coudn't, that's all.
It's good, been doing that since years Keeps everything nice and clean, and you're the only one who can compile it (as long as you dont share the files..)
You could add that using y_hooks might be a good idea when doing this..

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)