diff --git a/addons/amxmodx/scripting/include/mm_incs/defines.inc b/addons/amxmodx/scripting/include/mm_incs/defines.inc index 0bb500b..4063e27 100644 --- a/addons/amxmodx/scripting/include/mm_incs/defines.inc +++ b/addons/amxmodx/scripting/include/mm_incs/defines.inc @@ -3,13 +3,7 @@ #endif #define _mm_defines_included_ -#define PLUGIN_NAME "MultiMod Manager" - -#define MM_VERSION_MAJOR 2 -#define MM_VERSION_MINOR 2 -#define MM_VERSION_COMMIT 206 - -#define PLUGIN_VERSION fmt("v%d.%d.%d", MM_VERSION_MAJOR, MM_VERSION_MINOR, MM_VERSION_COMMIT) +#define PLUGIN_NAME "MultiMod Manager CS" #define PLUGIN_URL "https://github.com/FEDERICOMB96/amxx-multimod-manager" #define MM_PLUGINS_FILENAME "plugins-multimodmanager.ini" diff --git a/addons/amxmodx/scripting/include/mm_incs/version.inc b/addons/amxmodx/scripting/include/mm_incs/version.inc new file mode 100644 index 0000000..690753e --- /dev/null +++ b/addons/amxmodx/scripting/include/mm_incs/version.inc @@ -0,0 +1,26 @@ +#if defined _mm_version_included_ + #endinput +#endif +#define _mm_version_included_ + +// Do NOT modify this file! + +/** + * AMX Mod X version check + */ +#if AMXX_VERSION_NUM < 200 + #error "Multimod Manager CS requires AMX Mod X 1.10 or higher. Download from: https://www.amxmodx.org/downloads-new.php?branch=master" +#endif + +/** + * ReAPI version check + */ +#if REAPI_VERSION < 524300 + #error "Multimod Manager CS requires ReAPI 5.24.300 or higher. Download from: https://github.com/s1lentq/reapi/releases/latest" +#endif + +#define MM_VERSION_MAJOR 2 +#define MM_VERSION_MINOR 2 +#define MM_VERSION_COMMIT 207 + +#define PLUGIN_VERSION fmt("v%d.%d.%d", MM_VERSION_MAJOR, MM_VERSION_MINOR, MM_VERSION_COMMIT) \ No newline at end of file diff --git a/addons/amxmodx/scripting/include/multimod_manager_natives.inc b/addons/amxmodx/scripting/include/multimod_manager_natives.inc index e08f676..a5ce4a1 100644 --- a/addons/amxmodx/scripting/include/multimod_manager_natives.inc +++ b/addons/amxmodx/scripting/include/multimod_manager_natives.inc @@ -3,15 +3,15 @@ #endif #define _multimod_manager_natives_included_ +#include + /** - * Multimod Manager version check. - * Do not modify this! + * MultiMod Manager CS library check */ -#define MM_VERSION_MAJOR 2 -#define MM_VERSION_MINOR 2 -#define MM_VERSION_COMMIT 206 - -#define MM_NATIVES_API_VER fmt("v%d.%d.%d", MM_VERSION_MAJOR, MM_VERSION_MINOR, MM_VERSION_COMMIT) +#pragma reqlib MultiModManagerCS +#if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib MultiModManagerCS +#endif enum ChangeMap_e { diff --git a/addons/amxmodx/scripting/include/multimod_manager_version.inc b/addons/amxmodx/scripting/include/multimod_manager_version.inc new file mode 100644 index 0000000..b18c3b6 --- /dev/null +++ b/addons/amxmodx/scripting/include/multimod_manager_version.inc @@ -0,0 +1,23 @@ +#if defined _multimod_manager_version_included_ + #endinput +#endif +#define _multimod_manager_version_included_ + +// Do NOT modify this file! + +/** + * AMX Mod X version check + */ +#if defined AMXX_VERSION_NUM + #if AMXX_VERSION_NUM < 200 + #error "[API] Multimod Manager CS requires AMX Mod X 1.10 or higher. Download from: https://www.amxmodx.org/downloads-new.php?branch=master" + #endif +#else + #error "[API] Multimod Manager CS: please include multimod_manager_natives.inc after including amxmodx.inc." +#endif + +#define MM_VERSION_MAJOR 2 +#define MM_VERSION_MINOR 2 +#define MM_VERSION_COMMIT 207 + +#define MM_NATIVES_API_VER fmt("v%d.%d.%d", MM_VERSION_MAJOR, MM_VERSION_MINOR, MM_VERSION_COMMIT) \ No newline at end of file diff --git a/addons/amxmodx/scripting/multimod_manager.sma b/addons/amxmodx/scripting/multimod_manager.sma index 698e4d6..af414e3 100644 --- a/addons/amxmodx/scripting/multimod_manager.sma +++ b/addons/amxmodx/scripting/multimod_manager.sma @@ -4,6 +4,7 @@ #include #include #include +#include "mm_incs/version" #include "mm_incs/defines" #include "mm_incs/global" #include "mm_incs/natives" @@ -18,6 +19,8 @@ public plugin_natives() { + register_library("MultiModManagerCS"); + register_native("mm_get_mods_count", "_mm_get_mods_count"); register_native("mm_is_mod_enabled", "_mm_is_mod_enabled"); register_native("mm_get_mod_name", "_mm_get_mod_name");