PDA

View Full Version : [Include] [INC] Filterscript Loader


Ignas1337
21/05/2009, 12:50 PM
Filterscript Loader v1.0
by dante @ LTU
(a.k.a. Ignas1337)

I've been reading through posts a while ago and I came across with a certain topic. It was a vehicle ownership for the godfather script. Now, we all know that godfather+FS vehicle ownership is no good without major editing, so I came up with this idea. If filterscripts are loaded BEFORE gamemodes, so why don't I switch that and make a gamemode load the filterscripts after everything has been set (for example vehicles has been spawned in GF).

Credits
Credits to Denver(Astro) for his LoadTmp() function which I used as a base
Credits to whoever created 'split' function
Credits to anyone I forgot and me for bringing it all together.

What does this include do?

This include contains two functions: LoadFS and split. I needed the split to process the files. This script reads the file 'filterscripts.cfg' in scriptfiles folder and then starts tem using rcon command.

What should I do for it to work?

You should #define FILTERSCRIPT_COUNT before including this filterscript and modify the 'filterscripts.cfg' file in scriptfiles folder. FILTERSCRIPT_COUNT defines how many filterscript entries will be read on 'LoadFS()'

Downloads

I've included pawno with a new file which defines what is needed includes the include. Also there is a scriptfiles folder with filterscripts.cfg. Remove everything from it and place the names of filterscripts you need to use. Also, remove the filterscripts line from server.cfg. Redefine FILTERSCRIPT_COUNT to how many scripts you're using.

Rapidshare (http://rapidshare.com/files/238171063/fs.inc.html)
Mediafire (http://www.mediafire.com/?sharekey=443b576fa400c2936e7203eb87368129e04e75f6 e8ebb871)
Pastebin (http://pastebin.ca/1437802)

Any mirrors would be great!

*Links updated*
(sorry, didn't find the rar, uploaded .inc only!)


If you require any help, post right away! If you find any bugs, I'll see in to it that they get solved. Thank you.

Ignas1337
21/05/2009, 01:09 PM
ok, posted now.

KeyWay
21/05/2009, 01:34 PM
THIS IS WEIRD! :D
Just 5 minutes ago i camed up to make this one, so i made my own :D

Divine
21/05/2009, 01:38 PM
Good job bahuras ;) ;) :P

yezizhu
21/05/2009, 01:43 PM
emmm...does it usless?
I can add SendRCONCommand in OnGa'eModeInit...
Anyway,I respect ur work^^

KeyWay
21/05/2009, 01:52 PM
emmm...does it usless?
I can add SendRCONCommand in OnGa'eModeInit...
Anyway,I respect ur work^^


Well maybe you dont want to everytime /rcon login pass and /rcon loadfs fsname everytime server restarts/crashes.

Much simple is this, just starts server and WOALA.

This is also very good for people who uses GF GM and wants carownership or other FS.

Ignas1337
21/05/2009, 01:59 PM
THIS IS WEIRD! :D
Just 5 minutes ago i camed up to make this one, so i made my own :D

wierd :)

Good job bahuras ;) ;) :P

thanks

emmm...does it usless?
I can add SendRCONCommand in OnGa'eModeInit...
Anyway,I respect ur work^^

What can I say? this way it's the same way as adding a new FS in the server.cfg, just you need to add it esewhere and one three lines does it all in a script.
And thanks ;)

yezizhu
21/05/2009, 02:52 PM
emmm...does it usless?
I can add SendRCONCommand in OnGa'eModeInit...
Anyway,I respect ur work^^


Well maybe you dont want to everytime /rcon login pass and /rcon loadfs fsname everytime server restarts/crashes.

Much simple is this, just starts server and WOALA.

This is also very good for people who uses GF GM and wants carownership or other FS.


public OnGameModeInit(){
SendRCONCommand("loadfs fsname");
return true;
}

yezizhu
21/05/2009, 03:04 PM
Any nice example?

Ignas1337
21/05/2009, 03:54 PM
you're right yezizhu, but I did it this way because I like the way samp handled files. I could've made 'LoadFS(fsname[])' :)

yezizhu
22/05/2009, 12:43 AM
you're right yezizhu, but I did it this way because I like the way samp handled files. I could've made 'LoadFS(fsname[])' :)

All right.I'd use ur inc if is necessary

Ignas1337
22/05/2009, 05:29 AM
you're right yezizhu, but I did it this way because I like the way samp handled files. I could've made 'LoadFS(fsname[])' :)

All right.I'd use ur inc if is necessary


gad to hear so :)

RyDeR`
22/05/2009, 07:14 AM
Nice

Ignas1337
23/05/2009, 11:30 AM
RyDeR ]
Nice

thanks

Weirdosport
23/05/2009, 06:48 PM
I don't know if I'm missing the point here, but what the hell is wrong with editing the server.cfg file and adding your filterscripts to the filterscripts line? God knows I've been doing it since the dawn of time (my time).

Ignas1337
24/05/2009, 03:33 AM
yes, but this changes the sequence the fs's are loaded, so it's good for vehicle spawning fs's in godfather or some other gm with strict vehicle id rules. With this you can load fs AFTER gm, so... It doesn't mess up the gm vehicle ids

Ignas1337
28/05/2009, 02:02 PM
*links updated!*

Weirdosport
28/05/2009, 05:23 PM
If you want to change the order they laod in change the order of the words in your filterscripts line.........

Burridge
28/05/2009, 05:34 PM
I can honestly say, What's the point in this? I mean a filterscript to load other filterscripts? Nice idea, but maybe /rcon loadfs (or /rcon reloadfs) is a quicker way, or just edit the .CFG file, still nice work.

Ignas1337
29/05/2009, 02:15 PM
editing cfg wouldn't make car ids go AFTER the gamemode. and this is not a fs, it's an include which is to be put inside a gm... whatever :O

Ignas1337
29/05/2009, 02:16 PM
If you want to change the order they laod in change the order of the words in your filterscripts line.........


you cannot change the order gamemodes/fs's load. of course the sequence of them of course, but you can't make a gamemode load before filterscript, as filterscripts will load BEFORE gamemode, always! (uness you use my INC, or a rcon command!)

Ignas1337
29/06/2009, 07:58 PM
yeah!