View Single Post
ratawar
BANNED
Join Date: Dec 2017
Location: GB
Old 09-15-2020 , 12:10   Re: [TF2] Friendly - 09/14/2020
Reply With Quote #3

Quote:
Originally Posted by MAGNAT2645 View Post
There's already Friendly plugins with same functions on the forum.

1) As i know (non)friendlies still can hurt (non)friendlies by using some plugins. For example: RTD. You should add OPTIONAL support.
2) In your plugin friendlies can collide with non-friendlies which is bad.
3) You shouldn't use public keyword for normal functions (DisableFriendly, EnableFriendly etc.) because this keyword is mostly used by callbacks.
Normal functions are already "public" (only inside of your plugin, natives can be used outside), unless you have defined them as static.
4) It is best to make some includes OPTIONAL if you're going to publish your plugins.
First of all, you can use #tryinclude instead of #include for things like soap_tournament.
Also if optional include has some natives you can undefine REQUIRE_PLUGIN macro like:
Code:
#undef REQUIRE_PLUGIN
#tryinclude <myinclude>
#define REQUIRE_PLUGIN
Many includes have function (only if REQUIRE_PLUGIN is undefined) that makes natives optional.
Thank you a lot for your feedback.

I started developing this with "normal" servers in mind like mine, (maybe) recklessly ignoring heavily modded servers with plugins such as RTD or others, and therefore not making that very clear in the plugin description. I'm working to add support for stuff that make friendlies as unintrusive to the world as possible, like not being able to collide, capture or carry stuff. Even though my learning pace is really good, messing with stuff like that is still new to me, so the project might be very far from good sometimes.

Still, I don't have in mind making this plugin as extense as the other 2 already existing friendly plugins, since as I pointed out earlier, it's meant for servers where it's not necessary to take care of too many details outside stock stuff.

As for the code suggestions, I appreciate them a lot, I will correct everything you pointed me out in no time, and keep it in mind for the future.
Regarding the includes - also a fairly unexplored topic for me - I will focus on improving SOAP's support with your tips as well.

Last edited by ratawar; 09-15-2020 at 12:11.
ratawar is offline
Send a message via ICQ to ratawar Send a message via AIM to ratawar Send a message via Yahoo to ratawar Send a message via Skype™ to ratawar