At the moment, the Sample and Stub code that is included with the metamod download will not build as-is with Visual Studio or the Linux Makefile. I am not familiar with AMBuild but intend to use it eventually. Ages ago, I used these examples to write my first MMS plugins. I still think they are useful to folks trying to get a start in writing them.
I have made changes to the Makefiles for Linux and the solution and project files for Visual Studio versions 2010, 2012, 2013, and 1015. I didn't mess with VS2005 or VS2008. I understand that the AM build team uses VS2015 for all their work, so I didn't go any farther than that.
The plugin code was originally provided when the number of HL2SDK versions was smaller (12) where currently it looks like 26.
The older engine versions were:
I have limited the update to these except for Episode 1 and Orange Box Valve. These don't seem to have current or usable SDKs. I plan to add TF2.
Now, the AMBuild script has its own enumeration of these, 1-22. The are similar, SE_*.
The MMS defines a list in ISmmPluginExt.h:
#define SOURCE_ENGINE_UNKNOWN 0
#define SOURCE_ENGINE_DOI 24
It appears that the MMS list is used internally to MMS. I assume that the SE_* enumeration is defined by the build mechanism (AMBuild, Makefile, VS project) and is thus arbitrary and flexible.
The Stub code does not have any conditional compiles for engine type but the Sample code does. I have used older enumerations and both plugins compile and run, although Stub doesn't do anything.
The Sample plugin compiles and I tested it with CSS. It has an example for ClientCommand" that works except for "entry" which is supposed to turn the input into a "say" command. However, it generates the infamous "FCVAR_SERVER_CAN_EXECUTE prevented server running command: say" error. I assume that it worked at one time.
I could use some help with AMBuild. Right now I am having trouble getting it to install in my Windoze 10 machine - some permission issue in the python window.
Is anyone interested in this? I figure it would be helpful to someone looking for something to start with. Ultimately, it would be a tutorial on just how to do that with Linux makefile, Visual Studio, and hopefully, AMBuild.