diff --git a/plugins/amxmod_compat/core.sma b/plugins/amxmod_compat/core.sma index d1595a58..decb0909 100644 --- a/plugins/amxmod_compat/core.sma +++ b/plugins/amxmod_compat/core.sma @@ -288,7 +288,7 @@ public __is_module_running(plid, num) get_string(1, module, 63) - return is_module_loaded(module) + return is_module_running(module) } public __is_plugin_running(plid, num) @@ -297,5 +297,5 @@ public __is_plugin_running(plid, num) get_string(1, plugin, 63) - return is_plugin_loaded(plugin) + return is_plugin_running(plugin) } diff --git a/plugins/include/amxmod_compat/amxmod.inc b/plugins/include/amxmod_compat/amxmod.inc index 99dd92de..94019166 100644 --- a/plugins/include/amxmod_compat/amxmod.inc +++ b/plugins/include/amxmod_compat/amxmod.inc @@ -297,12 +297,22 @@ stock get_plugincvarsnum(plugin[], flags=0) return cvars_total; } -stock is_module_running(const plugin[]) +stock is_module_running(const module[]) { - return is_module_loaded(plugin); + if (strcmp(module, "MySQL Access") == 0) + return LibraryExists("sqlx", LibType_Class); + + return is_module_loaded(module) == -1 ? 0 : 1; } stock is_plugin_running(const plugin[]) { - return is_plugin_loaded(plugin); + new status[8] + new id, filename[1], name[1], version[1], author[1] + + id = is_plugin_loaded(plugin) + + get_plugin(id, filename, 0, name, 0, version, 0, author, 0, status, 7) + + return strcmp(status, "running") == 0 ? id + 1 : 0 }