From 6e56aed778d636815be07edaa63ab50601f61e52 Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Wed, 13 Sep 2006 10:58:47 +0000 Subject: [PATCH] More tiny bcompat stuff. admincmd is now source compatible at least --- plugins/amxmod_compat/core.sma | 20 ++++++++++++++++++++ plugins/include/amxmod_compat/amxmod.inc | 10 ++++++++++ 2 files changed, 30 insertions(+) diff --git a/plugins/amxmod_compat/core.sma b/plugins/amxmod_compat/core.sma index 0981167d..d1595a58 100644 --- a/plugins/amxmod_compat/core.sma +++ b/plugins/amxmod_compat/core.sma @@ -32,6 +32,8 @@ Core_Natives() register_native("get_plugincmd", "__get_plugincmd") register_native("get_plugincvarsnum", "__get_plugincvarsnum") register_native("get_plugincvar", "__get_plugincvar") + register_native("is_module_running", "__is_module_running") + register_native("is_plugin_running", "__is_plugin_running") } public __VelocityByAim(plid, num) @@ -279,3 +281,21 @@ public __get_plugincvar(plid, num) return 0 } + +public __is_module_running(plid, num) +{ + static module[64] + + get_string(1, module, 63) + + return is_module_loaded(module) +} + +public __is_plugin_running(plid, num) +{ + static plugin[64] + + get_string(1, plugin, 63) + + return is_plugin_loaded(plugin) +} diff --git a/plugins/include/amxmod_compat/amxmod.inc b/plugins/include/amxmod_compat/amxmod.inc index a59562e8..99dd92de 100644 --- a/plugins/include/amxmod_compat/amxmod.inc +++ b/plugins/include/amxmod_compat/amxmod.inc @@ -296,3 +296,13 @@ stock get_plugincvarsnum(plugin[], flags=0) return cvars_total; } + +stock is_module_running(const plugin[]) +{ + return is_module_loaded(plugin); +} + +stock is_plugin_running(const plugin[]) +{ + return is_plugin_loaded(plugin); +}