[Include] [INC] Filterscript Loader
#1

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
Mediafire
Pastebin

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

ok, posted now.
Reply
#3

THIS IS WEIRD!
Just 5 minutes ago i camed up to make this one, so i made my own
Reply
#4

Good job bahuras :P
Reply
#5

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

Quote:
Originally Posted by yezizhu
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.
Reply
#7

Quote:
Originally Posted by KeyWay
THIS IS WEIRD!
Just 5 minutes ago i camed up to make this one, so i made my own
wierd
Quote:
Originally Posted by Divine
Good job bahuras :P
thanks
Quote:
Originally Posted by yezizhu
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
Reply
#8

Quote:
Originally Posted by KeyWay
Quote:
Originally Posted by yezizhu
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;
}
Reply
#9

Any nice example?
Reply
#10

you're right yezizhu, but I did it this way because I like the way samp handled files. I could've made 'LoadFS(fsname[])'
Reply
#11

Quote:
Originally Posted by Ignas1337
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
Reply
#12

Quote:
Originally Posted by yezizhu
Quote:
Originally Posted by Ignas1337
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
Reply
#13

Nice
Reply
#14

Quote:
Originally Posted by [WsR
RyDeR ]
Nice
thanks
Reply
#15

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).
Reply
#16

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
Reply
#17

*links updated!*
Reply
#18

If you want to change the order they laod in change the order of the words in your filterscripts line.........
Reply
#19

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

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)