Quote:
|
But it still required user to re-compile the plugins with the compiler that doesn't have zombieplague.inc in the include folder or remove the #include <zombieplague> in the plugins.
|
Yes but wouldn't need to remove the include, as I replaced with #tryinclude, which first check if the file exists before including. If you want this to be dynamic, that is, not recompiling the plugin in order to it work, delete the #if defined part of the code, but then the user would need to have zombieplague.inc, alternatively you can define the natives directly in the plugin as you do in includes. If you're targetting only zp50 and zp43 you should be fine, but for modified ZPs you may end up having problems
Quote:
|
Also, it would only handle zp_register_extra_item in your example. If the plugins contain another native zp_get_user_zombie or zp_class_nemesis_get would throw an error.
|
if zp_register_extra_item exists it's very likely that zp43 is also loaded but if you want to make sure, you can check all natives you're going to use in your plugin using the same native_filter method.
Quote:
|
@CrazY. Is it possible to do something like this? Since OP want the native only create for ZP and clcmd for Normal
|
That's not going to work as expected since native_filter seems to be called only after you "trigger" a native. I would probably register a native without the zp prefix and then check if zp is running or not and make the plugin act accordingly
__________________