Пользователь
- Сообщения
- 18
- Реакции
- 0
Код:
#include <amxmodx.h>
// Module identifier (must be unique)
#define CORE_MODULE_ID "CoreModule"
// Global variable signaling module readiness
bool g_bModuleReady = false;
// Nativ to check if the module is ready
static cell AMX_NATIVE_CALL n_is_core_module_ready(AMX *amx, cell *params)
{
return g_bModuleReady;
}
// AMX Mod X callback: The module is loading
void OnAmxxModuleInit() {
// Register the module
MF_RegisterModule(CORE_MODULE_ID);
// Register the native
MF_RegisterNative("is_core_module_ready", n_is_core_module_ready);
// The module is ready
g_bModuleReady = true;
// You can display a message that the module is loaded (optional)
// log_amx("Core module loaded.");
}
// AMX Mod X callback: The module is unloaded
void OnAmxxModuleUnload() {
g_bModuleReady = false;
// You can display a message that the module is unloaded (optional)
// log_amx("Core module unloaded.");
}
// Module Information (AMX Mod X required)
const char* GetPluginAuthors() {
return "Your Name";
}
const char* GetPluginVersion() {
return "1.0";
}
const char* GetPluginFile() {
return "core_module"; // Module file name without an extension
}
Hi all, hint or better help to compile this module, if you can.
If I have written to the wrong topic with this problem, please indicate which topic to re-create the question.
Any help would be appreciated!
thanks in advance