Added the plugins directory to CVS and updated the files

This commit is contained in:
Christian Hammacher
2005-12-11 17:31:06 +00:00
parent 7cc586bd0c
commit 3f36b51f6c
23 changed files with 2529 additions and 0 deletions

View File

@ -0,0 +1,26 @@
#include "sample.h"
#include "studio_api.h"
#include <stdio.h>
#include <windows.h>
#include <string.h>
EXPORT void PluginLoad(load_info *LoadInfo) {
LoadInfo->sPluginName = "C(++) Example"; // Set PlugIn-name
LoadInfo->sPluginDescription = "Simple example for creating plugins with C(++)"; // Set description
SendStudioMsg(SCM_MENU_ADDITEM, "Tools->Hello World! [C++]", -1); // Register menu items
/* [...] */
}
EXPORT void PluginUnload() {
SendStudioMsg(SCM_REMOVE_MENUITEM, "Hello World! [C++]", 0);
}
EXPORT int CustomItemClick(CHAR *Caption) {
if (strcmp(Caption, "Hello World! [C++]") == 0) { // If caption is equal set text and return PLUGIN_HANDLED
SendStudioMsg(SCM_EDITOR_SETTEXT, "Hello World!\n\nThis is an example for C(++) plugins for AMXX-Studio.", 0);
return PLUGIN_HANDLED;
}
else
return PLUGIN_CONTINUE;
}