How to make an Include?
#1

Hello,

I saw a lot of people creating Includes and I really want to make my own. How can I make one?

Thanks in advance!
Reply
#2

and include is just a bunch of functions u gotta make the functions like
pawn Код:
native Repair(vehicleid);
then the stock to do it like

pawn Код:
stock Repair(vehicleid);
{
    //code
}
Reply
#3

Just look at some examples in you include folder, that should help you get started.
Reply
#4

yeah
Reply
#5

Thank you guys, I will try to do my best to learn it by myself and that example! And I'd like to see and read more!
Reply
#6

Going off of what Stigg and Zonoya said, that's the perfect way to learn. Check out the includes, maybe some custom ones you have downloaded. For starters you could start out by making a simple include with a few functions, like
Код:
Heal(playerid);
You can use programs such as notepad, notepad++, or even pawno. Although you don't compile includes, so when you use it if it has errors, that's when they show up. As for my Heal example, you would start out by
Код:
#include <a_samp>
Then you would make you function, these could be stocks or publics. Publics will require you to forward it, stocks will not. So you can do
Код:
stock Heal(playerid)
{
	SetPlayerHealth(playerid, 100);
}
Some other things you can do to start out with includes is, make a color include. Just add the
Код:
#include <a_samp>
like I said before, then you can add all the colors you want:
Код:
#define COLOR_FADE1 0xE6E6E6E6
#define COLOR_FADE2 0xC8C8C8C8
#define COLOR_FADE3 0xAAAAAAAA
#define COLOR_FADE4 0x8C8C8C8C
#define COLOR_FADE5 0x6E6E6E6E
Those are just some common colors used, have fun and good-luck.
Reply
#7

Thanks a lot! I am going to do my best making new colors include! Thank you!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)