00001 /** 00002 * vim: set ts=4 : 00003 * ============================================================================= 00004 * SourceMod Extension Code for Metamod:Source 00005 * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. 00006 * ============================================================================= 00007 * 00008 * This program is free software; you can redistribute it and/or modify it under 00009 * the terms of the GNU General Public License, version 3.0, as published by the 00010 * Free Software Foundation. 00011 * 00012 * This program is distributed in the hope that it will be useful, but WITHOUT 00013 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00014 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 00015 * details. 00016 * 00017 * You should have received a copy of the GNU General Public License along with 00018 * this program. If not, see <http://www.gnu.org/licenses/>. 00019 * 00020 * As a special exception, AlliedModders LLC gives you permission to link the 00021 * code of this program (as well as its derivative works) to "Half-Life 2," the 00022 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software 00023 * by the Valve Corporation. You must obey the GNU General Public License in 00024 * all respects for all other code used. Additionally, AlliedModders LLC grants 00025 * this exception to all derivative works. AlliedModders LLC defines further 00026 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), 00027 * or <http://www.sourcemod.net/license.php>. 00028 * 00029 * Version: $Id$ 00030 */ 00031 00032 #ifndef _INCLUDE_SAMPLE_MMS_SOURCEMOD_EXTENSION_ 00033 #define _INCLUDE_SAMPLE_MMS_SOURCEMOD_EXTENSION_ 00034 00035 #include "sm_sdk_config.h" 00036 00037 using namespace SourceMod; 00038 00039 class MyExtension : public IExtensionInterface 00040 { 00041 public: 00042 virtual bool OnExtensionLoad(IExtension *me, 00043 IShareSys *sys, 00044 char *error, 00045 size_t maxlength, 00046 bool late); 00047 virtual void OnExtensionUnload(); 00048 virtual void OnExtensionsAllLoaded(); 00049 virtual void OnExtensionPauseChange(bool pause); 00050 virtual bool QueryRunning(char *error, size_t maxlength); 00051 virtual bool IsMetamodExtension(); 00052 virtual const char *GetExtensionName(); 00053 virtual const char *GetExtensionURL(); 00054 virtual const char *GetExtensionTag(); 00055 virtual const char *GetExtensionAuthor(); 00056 virtual const char *GetExtensionVerString(); 00057 virtual const char *GetExtensionDescription(); 00058 virtual const char *GetExtensionDateString(); 00059 }; 00060 00061 bool SM_LoadExtension(char *error, size_t maxlength); 00062 void SM_UnloadExtension(); 00063 00064 extern IShareSys *sharesys; 00065 extern IExtension *myself; 00066 extern MyExtension g_SMExt; 00067 00068 #endif //_INCLUDE_SAMPLE_MMS_SOURCEMOD_EXTENSION_ 00069
1.5.1