View Single Post
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 09-15-2020 , 02:36   Re: [TF2] Friendly - 09/14/2020
Reply With Quote #2

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.
__________________

Last edited by MAGNAT2645; 09-15-2020 at 02:43.
MAGNAT2645 is offline