how to create includes?
#1

^^^^^^^^
Reply
#2

Open notepad, save text file as .inc. Write in it.
Reply
#3

what to write? i wanna know its functions..
Reply
#4

Quote:
Originally Posted by XHunterZ
Посмотреть сообщение
what to write? i wanna know its functions..
You make your own functions in there.
Reply
#5

An include is nothing more than a piece of Pawn code. The compiler essentially takes the contents of that file and inserts it at the specified place in the main script. The include directive can appear anywhere and an included file can contain any content. This is valid:

main script:
PHP код:
public OnGameModeInit()
{
    
#include ..\source\maps\my_map.txt
    
return 1;

my_map.txt
PHP код:
CreateObject(...);
CreateObject(...);
CreateObject(...); 
Reply
#6

Pretty sure there is a tutorial. Oh well, here it is, made by Fratello aka ShutDown.

https://sampforum.blast.hk/showthread.php?tid=611273
Reply
#7

Here is best includes tutorial, enjoy
https://sampforum.blast.hk/showthread.php?tid=497081
Reply
#8

Lordy made full tutorial I made basics for newbies.

Look at my tutorial if you want to. In your includes put something special, worth. Like mySQL connection or i dont know, some systems such as headshot, ( not so ) but ok.

If some-one has only GM(without includes ( most part )) he cant complie or run it at all.

Link : https://sampforum.blast.hk/showthread.php?tid=611273

Thanks BurnZ for sharing the link, finally someone after 500 years hahah lol.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)