Include and Filterscript
#1

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?
Reply
#2

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.
Reply
#3

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?
Reply
#4

Woops sorry.
Reply
#5

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.
Reply
#6

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)