Raised This Month: $ Target: $400
 0% 

'Hybrid' Plugin?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 09-24-2021 , 08:16   Re: 'Hybrid' Plugin?
Reply With Quote #1

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
__________________








CrazY. is offline
asdian
Member
Join Date: Sep 2016
Location: Indonesia
Old 09-25-2021 , 19:30   Re: 'Hybrid' Plugin?
Reply With Quote #2

ok now i'm confused

but appreciated to your answers
asdian is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode