View Single Post
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 11-05-2016 , 14:00   Re: Plugin dependencies (Natives)
Reply With Quote #2

Yes, this is normal behavior as plugins can be loaded in any order.

Are you calling RegPluginLibrary("yourpluginname") inside AskPluginLoad2() in plugin A? If so, to check if plugin A is loaded:

Plugin B:
PHP Code:
public void OnPluginStart()
{
    if (
LibraryExists("yourpluginname")) {
        
my_native(xxxxxxxx);
    }
}

public 
void OnLibraryAdded(const char[] name)
{
    if (
StrEqual(name"yourpluginname")) {
        
my_native(xxxxxxxx);
    }

There is also OnAllPluginsLoaded() which I've never used, so not sure if it has other side effects.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline