Thread: Updater
View Single Post
Nefarius
Member
Join Date: Sep 2010
Old 04-21-2014 , 06:46   Re: Updater
Reply With Quote #431

Quote:
Originally Posted by GAVVVR View Post
Hello. I would like to use an updater in my plugin, but i would also like the plugin could be loaded if there is no Updater on current server. To add Updater support, i use the example code from the 1st post of thos topic. When i try to load my plugin w/o loaded updater i get the message:

I wonder if there is any way to start my compiled .smx with updater support if there is no updater on the server?
There is. Don't forget the
Code:
#undef REQUIRE_PLUGIN
#include <updater>
in your header and also add
Code:
public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
{
	// Updater
	MarkNativeAsOptional("Updater_AddPlugin");
	MarkNativeAsOptional("ReloadPlugin");
	
	return APLRes_Success;
}
to your plugin and it should do fine.
__________________
Let the future tell the truth and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I really worked, is mine.
- Nikola Tesla
Nefarius is offline