Include vs 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 vs filterscript (
/showthread.php?tid=351226)
Include vs filterscript -
Gryphus One - 15.06.2012
Hi, I'm a scripting beginner and I have noticed that if I want to have my own collection of custom functions, variables and arrays to use them in whichever gamemode I want, I have two ways: either an include (calling its functions in some callbacks of the gamemode), or a filterscript with its own callbacks where to call those functions, and I don't know which way I should choose. The advantage I see in filterscripts is that I can enable and disable them by just editing my server.cfg file which allows a more modular design, whereas includes force you to recompile your gamemode every single time you add or remove one or more includes. But on the other hand, I think there's a limit in the number of filterscripts you can use at the same time, whereas as far as I know includes don't have such a limit. Besides, if I only use a gamemode with includes and no filterscripts, I can set with more precision the order in which functions will be executed. But apart from all of this, is there anything else I should take into account? What about performance? what way is faster and more efficient?
I'm thinking of releasing a piece of script that I have written, what format do you recommend me to release it in?
Re: Include vs filterscript -
tiernantheman - 15.06.2012
I'd say release it as an include good luck with it hope it's good.