SA-MP Forums Archive
Include and Filterscript - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Include and Filterscript (/showthread.php?tid=283208)



Include and Filterscript - Dr - 14.09.2011

What is the difference?
If I want to make a house system and leave it out of my script, what is better to use filterscript or include?


Re: Include and Filterscript - Kush - 14.09.2011

An include is a directive which contains native functions and declarations. The pre-processor or 'compiler' in this case, is aware of the include's contents, and allows full user manipulation.

A filterscript is a file which may contain the same content as a gamemode (though modified) usage of native callbacks, functions etc. Filterscripts released does not affect the gamemode, though may cause conflicts.


Re: Include and Filterscript - Dr - 14.09.2011

And would making a house system be better through a include or filterscript, in your opinion of coarse.

Also what are the includes default functions and how can I make a new include?


Re: Include and Filterscript - Dr - 14.09.2011

Woops sorry.


Re: Include and Filterscript - Kush - 14.09.2011

Quote:
Originally Posted by Dr
Посмотреть сообщение
And would making a house system be better through a include or filterscript, in your opinion of coarse.

Also what are the includes default functions and how can I make a new include?
The main purpose of an include is for the user set native functions to be called.

Example: ZCMD is an include. This include allows users to create commands outside of the native callback 'OnPlayerCommandText'.

Another Example: GarHouse is a filterscript. It is a Housing system. You are unable to call any functions included in a filterscript into a gamemode. The compiler does not recognize GarHouse in anyway because there are no form of included segments or lines of coding which relate to GarHouse in your gamemode.


Re: Include and Filterscript - iPLEOMAX - 14.09.2011

If you want something that you'll be using for 2 or more different scripts, use Includes.
Why? Because you just need to #include <it> and use the functions without writing all over again.

Make FilterScripts otherwise.