How can i make an include?
#1

How do i make an include? like a include that includes functions. Like dudb -.- but not exactly.
Reply
#2

Save a file under the .inc filetype, I'd suggest going to File > Save as > <file.inc>
Reply
#3

...... i know how to do that, thats not what i mean..... how do i script one not save a file.....
Reply
#4

you should really learn how to script in pawn first and then worry about includes.

includes are tough to make.
Reply
#5

Just see others includes..
Reply
#6

i was asking that question too but i really didn't get any help so please give me and him some help cuz i want to put all my maps in includes but i can't ?? pplease help him and me
Reply
#7

im good at scripting in pawn im not a noob, i just never understood includes..... iv made my own login system, admin system, house system, and car registering to player system. just not an include.... lol
Reply
#8

I do not understand whats that hard about includes.
Just imagine them to be a part of your main code, just externalized into another file. To define the include as one, you mostly use the same "header", you can use the first lines of a_samp.inc or so.
Then all you have to do, is to add the code you like. This can be stocks, publics, timers.... On compile, the compilers just handles them, as if they were in the same file with the normal script.
Reply
#9

just go
Код:
#if defined _something_included
#endinput
#endif

#define _something_included
#pragma library something

//then do functions and stuff here 

#endinput
//finishes it then just save as "something.inc"

then include the file and put it in the right folder 
#include <something.inc> //pawno/include folder
or
#include "something.inc" along side the gamemode you building
see? simple
Reply
#10

1. Make a pawn(o) script.
2. Instead of saving to the location as a .pwn, save it to the location as a .inc
3. To include, at the top of your script, use

pawn Код:
#include <your_include_name_here>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)