Team developing - includes
#1

Hi!

I own an RP server with an ugly gamemode.
I don't want to rewrite it from scratch, i need to keep it, and make it better.

The problem is that it's a single pwn with lots of code on it, and this makes things harder for teamwork.
So, the idea is to split code in a set of includes

Does anyone have any experience doing this, or some idea to help us?

Thanks
Reply
#2

Splitting a Game Mode into includes? It's a NO NO. Why don't just take parts of code like OnPlayerSpawn, OnPlayerRequestClass etc.
Reply
#3

You can put each callback in a separate include file and then use #include in your main script.
Reply
#4

I wanted to do something like:

IRP_Vehicles.inc: With all vehicle related functions and dcmds
IRP_Player.inc: With all player info and account related functions
IRP_Properties.inc: With all property related functions
IRP_Commands: With OnPlayerCommandText and dcmd calls and some general commands that don't fit in other includes.

Isn't it a good idea?

Thanks all
Reply
#5

Donґt make it us .inc.
Make it as a part of Filterscript. You can have till 15 Filterscripts in one server.

Reply
#6

But you cannot share info between filterscripts...

In example, if i make a vehicles fs, i need to have access to player's inventory to check if he has the keys...
And if i also do a properties fs, i have to check if he has the keys to enter it.
So i will need to share the inventory between filters... that's not possible
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)