1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2024-11-28 10:24:20 +01:00

Added MSVC project templates for MM:S plugins (bug 3523).

This commit is contained in:
Daedilus 2009-02-16 18:13:31 -05:00
parent 81d61c64a5
commit 04f5af1828
26 changed files with 3921 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="MMSProjectTemplate"
ProjectGUID="{F8052FF1-63ED-4A4F-B70D-B4C0A9250BB4}"
RootNamespace="MMSProjectTemplate"
Keyword="CustomAppWizProj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Install|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="10"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="Installing the template, $(ProjectName), into $(VCInstallDir)"
CommandLine="xcopy &quot;$(ProjectDir)VC&quot; &quot;$(VCInstallDir)&quot; /s /y"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Template Files"
Filter="txt"
>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\plugin.vcproj"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\plugin.vdf"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\plugin_engine.h"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\plugin_hooks.cpp"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\plugin_hooks.h"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\plugin_mm.cpp"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\plugin_mm.h"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\ReadMe.txt"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\StdMMS.h"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\Templates.inf"
>
</File>
</Filter>
<Filter
Name="HTML Files"
Filter="htm"
>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\HTML\1033\default.htm"
DeploymentContent="true"
>
</File>
</Filter>
<Filter
Name="Image Files"
Filter="bmp"
>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Images\MMSProjectTemplate.gif"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Images\MMSProjectTemplate_Background.gif"
>
</File>
</Filter>
<Filter
Name="Script Files"
Filter="js"
>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Scripts\1033\default.js"
>
</File>
</Filter>
<Filter
Name="VCProject Files"
Filter="vsz;vsdir;ico;vcproj;csproj;css;inf"
>
<File
RelativePath=".\VC\VCProjects\MMSProjectTemplate.ico"
>
</File>
<File
RelativePath=".\VC\VCProjects\Metamod\MMSProjectTemplate.vsdir"
>
</File>
<File
RelativePath=".\VC\VCProjects\MMSProjectTemplate.vsz"
>
</File>
</Filter>
<Filter
Name="1033 Files"
>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\1033\Images\DottedHori.gif"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\1033\Images\DottedVert.gif"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\1033\NewStyles.css"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\1033\Images\spacer.gif"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,165 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="MMSProjectTemplate"
ProjectGUID="{F8052FF1-63ED-4A4F-B70D-B4C0A9250BB4}"
RootNamespace="MMSProjectTemplate"
Keyword="CustomAppWizProj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Install|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="10"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="Installing the template, $(ProjectName), into $(VCInstallDir)"
CommandLine="xcopy &quot;$(ProjectDir)VC&quot; &quot;$(VCInstallDir)&quot; /s /y"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Template Files"
Filter="txt"
>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\plugin.vcproj"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\plugin.vdf"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\plugin_engine.h"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\plugin_hooks.cpp"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\plugin_hooks.h"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\plugin_mm.cpp"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\plugin_mm.h"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\ReadMe.txt"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\StdMMS.h"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Templates\1033\Templates.inf"
>
</File>
</Filter>
<Filter
Name="HTML Files"
Filter="htm"
>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\HTML\1033\default.htm"
DeploymentContent="true"
>
</File>
</Filter>
<Filter
Name="Image Files"
Filter="bmp"
>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Images\metamod-site.gif"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Images\MMSProjectTemplate.gif"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Images\MMSProjectTemplate_Background.gif"
>
</File>
</Filter>
<Filter
Name="Script Files"
Filter="js"
>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\Scripts\1033\default.js"
>
</File>
</Filter>
<Filter
Name="VCProject Files"
Filter="vsz;vsdir;ico;vcproj;csproj;css;inf"
>
<File
RelativePath=".\VC\VCProjects\MMSProjectTemplate.ico"
>
</File>
<File
RelativePath=".\VC\VCProjects\Metamod\MMSProjectTemplate.vsdir"
>
</File>
<File
RelativePath=".\VC\VCProjects\MMSProjectTemplate.vsz"
>
</File>
</Filter>
<Filter
Name="1033 Files"
>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\1033\Images\DottedHori.gif"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\1033\Images\DottedVert.gif"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\1033\NewStyles.css"
>
</File>
<File
RelativePath=".\VC\VCWizards\AppWiz\Metamod\MMSProjectTemplate\1033\Images\spacer.gif"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -0,0 +1,6 @@
VSWIZARD 7.0
Wizard=VsWizard.VsWizardEngine.8.0
Param="WIZARD_NAME = MMSProjectTemplate"
Param="RELATIVE_PATH = VCWizards\AppWiz\Metamod"
Param="FALLBACK_LCID = 1033"

View File

@ -0,0 +1 @@
..\MMSProjectTemplate.vsz| |Metamod C++ Project|1|This wizard will create a Metamod Source Plugin Project.| |6777| |<MMSProjectTemplate>

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

View File

@ -0,0 +1,782 @@
/******************************************************************************/
/*DEFAULT STYLES FOR ALL SECTIONS**********************************************/
/******************************************************************************/
body { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
font-weight: normal;
font-size: 8pt;
color: buttontext;
background-color: buttonface;
margin-top: 0px;
margin-left: 0px;
margin-right: 0px;
margin-bottom: 0px;
overflow: auto; }
a:link { color: captiontext;
text-decoration: none; }
a:visited { color: captiontext;
text-decoration: none; }
a:active { color: captiontext;
text-decoration: none; }
a:hover { color: captiontext;
text-decoration: underline; }
table { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
font-weight: normal;
font-size: 8pt;
color: buttontext;
width: 100%; }
table.one { table-layout: fixed;
height: 100%;
width: 100%; }
/*DEFAULT STYLES FOR THE 'INTRODUCTION' TABLE**********************************/
/******************************************************************************/
table.two { table-layout: fixed;
height: 79px;
width: 100%;
background-color: window; }
td.image { text-align: right; }
/*DEFAULT STYLES FOR THE 'NAVIGATION' TABLE************************************/
/******************************************************************************/
table.linkText { line-height: 95%;
width: 1.7in;
height: 2.6em;
position: relative;
left: 0.1in;
z-index: 2; }
span { position: relative;
z-index: 3; }
span.horiLine1 { height: 30px;
width: 166px;
position: absolute;
top: -1px;
left: -1px;
bottom: -1px;
z-index: 2; }
/*DEFAULT STYLES FOR THE ALL BUTTONS AND THE 'BUTTONS' TABLE*******************/
/******************************************************************************/
button { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
font-weight: normal;
font-size: 8pt;
height: 23px;
cursor: hand; }
.buttons { width: 100%; }
/*DEFAULT STYLES FOR THE 'CONTENT' TABLE***************************************/
/******************************************************************************/
table.fixedSize { table-layout: fixed; }
table.content { table-layout: fixed;
height: 100%;
width: 100%; }
ol { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
font-weight: normal;
font-size: 8pt;
color: buttontext;
margin-top: -1px;
margin-bottom: 16px; }
ul { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
font-weight: normal;
font-size: 8pt;
color: buttontext;
margin-top: 3px;
margin-bottom: 16px; }
li { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
font-weight: normal;
font-size: 8pt;
color: buttontext;
position: relative;
left: -15px;
margin-bottom: 1px; }
span.itemTextTop { position: relative; }
span.itemText { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
font-weight: normal;
font-size: 8pt;
line-height: 9pt;
position: relative;
top: -3px; }
span.itemTextIndent { position: relative;
left: 17px;
top: -3px; }
span.sideBtnHidden { width: 100%;
margin-top: 3px;
margin-bottom: 0px; }
div.itemTextRadioAa { position: relative;
top: -17px;
left: 17px;
margin-bottom: -25px; }
div.itemTextRadioA { position: relative;
top: -19px;
left: 17px;
margin-bottom: -25px; }
div.itemTextRadioB { position: relative;
top: -19px;
left: 25px;
margin-bottom: -25px; }
div.itemTextRadioIndentA { position: relative;
top: -17px;
left: 30px;
margin-bottom: -25px; }
div.itemTextRadioIndentB { position: relative;
top: -17px;
left: 42px;
margin-bottom: -25px; }
div.itemTextCheckboxA { position: relative;
top: -17px;
left: 17px;
margin-bottom: -23px; }
div.itemTextCheckboxB { position: relative;
top: -18px;
left: 25px;
padding-top: 1px;
margin-bottom: -25px; }
div.itemTextCheckboxIndentB { position: relative;
top: -16px;
left: 42px;
margin-bottom: -25px; }
input { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
font-weight: normal;
font-size: 8pt;
color: buttontext; }
select { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
font-weight: normal;
font-size: 8pt;
color: buttontext; }
.radio { position: relative;
top: -2px;
left: 4px; }
.radioA { position: relative;
top: -1px;
margin-left: -4px;
z-index: 2; }
.radioIndent { margin-top: -2px;
margin-left: 17px; }
.radioIndentA { margin-top: -2px;
margin-left: 9px; }
.checkbox { position: relative;
top: -1px;
margin-left: -4px;
z-index: 2; }
.checkboxA { position: relative;
top: -2px;
left: 4px; }
.checkboxIndent { position:relative;
margin-top: -1px;
margin-left: 21px; }
.comment { width: 578px;
position: relative;
top: 5px;
bottom: 6px; }
.commentA { width: 398px;
position: relative;
top: 5px;
bottom: 6px; }
.commentB { width: 578px;
position: relative;
top: 3px;
bottom: -3px; }
/****THIS IS THE STANDARD TABBED WIZARD, TWO COLUMN INPUT BOX******************/
input.sideBtn { width: 193px;
position: relative;
top: 3px; }
/****THIS IS THE STANDARD THREE COLUMN WIZARD INPUT BOX************************/
input.sideBtnThreeColumn { width: 185px;
position: relative;
top: 3px; }
/****THIS IS THE DEFAULT INPUT BOX IN NON-TABBED AND 2 COLUMN WIZARD***********/
input.itemTextTwoColumnLong { width: 283px;
position: relative;
top: 3px; }
/****THIS IS AN INPUT BOX INDENTED UNDER A CHECKBOX SECTION********************/
input.sideBtnIndent { width: 175px;
position: relative;
top: 3px;
left: 18px;
bottom: 6px; }
/****THIS INPUT BOX HAS IS INDENTED UNDER A HEADING AND RULE SECTION***********/
input.sideBtnB { width: 185px;
position: relative;
top: 3px;
bottom: 6px; }
input.sideBtnBA { width: 175px;
position: relative;
top: 3px;
bottom: 6px; }
/****THIS INPUT BOX HAS A "..." BUTTON BESIDE IT AND IT'S A TABBED WIZARD******/
input.sideBtn2 { width: 169px;
position: relative;
top: 3px;
bottom: 6px; }
/****"..." BUTTON IN A NON-TABBED, 3 COLUMN WIZARD*****************************/
input.sideBtn2ThreeColumn { width: 161px;
position: relative;
top: 3px;
bottom: 6px; }
/****THIS IS AN INPUT BOX IN NON-TABBED AND 2 COLUMN WIZARD WITH A BUTTON******/
input.TwoColumnLongButton { width: 259px;
position: relative;
top: 3px;
bottom: 6px; }
/****THIS INPUT BOX HAS A "..." BUTTON BESIDE IT AND IT'S UNDER A CHECKBOX*****/
input.sidebtn2Indent { width: 151px;
position: relative;
top: 3px;
left: 18px;
bottom: 6px; }
/****"..." BUTTON IS UNDER A SECTION IN A TWO COLUMN AND TABBED WIZARD*********/
input.sidebtn21 { width: 161px;
position: relative;
top: 3px;
bottom: 6px; }
/****"..." BUTTON IS UNDER A SECTION IN A THREE COLUMN AND TABBED WIZARD*********/
input.sidebtn21A { width: 153px;
position: relative;
top: 3px;
bottom: 6px; }
/****THIS IS THE STANDARD TABBED WIZARD, TWO COLUMN SELECTION BOX**************/
select.sidebtn { width: 193px;
position: relative;
top: 4px;
bottom: -3px; }
select.sidebtnNoWidth { position: relative;
top: 4px;
bottom: -3px; }
/****THIS IS THE STANDARD TABBED WIZARD, ONE COLUMN SELECTION BOX**************/
select.sideBtnOneCLong { width: 398px;
position: relative;
top: 3px; }
/****THIS IS THE STANDARD THREE COLUMN WIZARD INPUT BOX************************/
select.sideBtnThreeColumn { width: 185px;
position: relative;
top: 4px;
bottom: -3px; }
/****THIS IS THE DEFAULT INPUT BOX IN NON-TABBED AND 2 COLUMN WIZARD***********/
select.itemTextTwoColumnLong { width: 283px;
position: relative;
top: 4px;
bottom: -3px; }
/****THIS SELECTION BOX IS INDENTED UNDER A HEADING AND RULE SECTION***********/
select.sidebtnB { width: 164px;
position: relative;
top: 4px;
left: 8px;
bottom: -3px; }
/****THIS SELECTION BOX IS BELOW AND ASSOCIATED WITH A CHECKBOX****************/
select.sidebtn2 { width: 164px;
position: relative;
top: 11px;
left: 17px;
bottom: -3px; }
select.sidebtnIndent { width: 175px;
position: relative;
top: 4px;
left: 18px;
bottom: -3px; }
/****THIS SELECTION BOX IS BELOW AND ASSOCIATED WITH A CHECKBOX AND HEADING****/
select.sidebtn2AShort { width: 168px;
position: relative;
top: 4px;
left: 25px;
bottom: -3px; }
/****THIS SELECTION BOX IS IN A TABBED, TWO COLUM WIZARD AND FOR < << > >>*****/
select.sidebtn3 { width: 177px;
position: relative;
top: 4px;
bottom: -3px; }
/****THIS IS A SELECTION BOX IN NON-TABBED AND 2 COLUMN WIZARD WITH A BUTTON***/
select.TwoColumnLongButton { width: 259px;
position: relative;
top: 4px;
bottom: -3px; }
/****THIS IS A SELECTION BOX IN NON-TABBED AND 2 COLUMN WIZARD WITH A BUTTON***/
select.IndentListBoxWithButton { width: 283px;
position: relative;
top: 4px;
bottom: -3px;
left: 18px; }
/****THIS IS THE DEFAULT OBJECT DROP DOWN IN 2 COLUMN AND TABBED WIZARD********/
object.itemtext { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
font-weight: normal;
font-size: 8pt;
color: buttontext;
width: 193px;
height: 2em;
position: relative;
top: 4px;
margin-bottom: 0px; }
/****THIS IS THE DEFAULT OBJECT DROP DOWN IN 3 COLUMN AND NON-TABBED WIZARD****/
object.itemtextThreeColumn { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
font-weight: normal;
font-size: 8pt;
color: buttontext;
width: 185px;
height: 2em;
position: relative;
top: 4px;
margin-bottom: 0px; }
/****THIS IS THE DEFAULT OBJECT DROP DOWN IN NON-TABBED AND 2 COLUMN WIZARD****/
object.itemTextTwoColumnLong{ font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
font-weight: normal;
font-size: 8pt;
color: buttontext;
width: 283px;
height: 2em;
position: relative;
top: 4px;
margin-bottom: 0px; }
.dropdowncombo { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif;
font-weight: normal;
font-size: 8pt;
color: buttontext; }
/****MOVES RADIO TEXT UP A BIT WHEN INLINE*************************************/
span.upABit { position: relative;
top: -2px; }
/****THIS DEFINES A STANDARD BUTTON IN THE CONTENT SECTION*********************/
.buttonClass { margin-top: 0px;
margin-bottom: -6px; }
/****THIS DEFINES ADD/REMOVE BUTTONS IN THE CONTENT SECTION********************/
.buttonClass2 { width: 75px;
padding-top: 1px;
margin-top: 7px; }
/****THIS DEFINES A "..." BUTTON IN THE CONTENT SECTION OUT OF THE SPAN TAG****/
.buttonClass3 { height: 19px;
width: 20px;
position: relative;
left: 1px;
top: 0px; }
/****THIS DEFINES A "..." BUTTON IN THE CONTENT SECTION WITHIN THE SPAN TAG***/
.buttonClass3Custom { height: 19px;
width: 20px;
position: relative;
left: 4px;
top: 3px; }
/****THIS DEFINES A "..." BUTTON IN THE CONTENT SECTION AND UNDER A CHECKBOX***/
.buttonClass3Indent { height: 19px;
width: 20px;
position: relative;
top: 0px;
left: 10px; }
/****THIS DEFINES A ">>" BUTTON IN THE CONTENT SECTION************************/
.buttonClass4 { margin-bottom: 4px;
width: 25px; }
/****THIS DEFINES ADD/REMOVE BUTTONS HORIZONTALLY IN THE CONTENT SECTION******/
.buttonClass5 { position: relative;
top: 4px;
width: 75px; }
/****THIS SETS THE LEFT MARGIN FOR THE REMOVE BUTTON***************************/
#removeBtn { margin-left: 4px; }
/****THIS SETS THE LEFT MARGIN FOR INDENTED SECTION UNDER CHECKBOXES***********/
label.indent { margin-left: 18px; }
/****THIS SETS THE LEFT MARGIN FOR INDENTED SECTION UNDER CHECKBOXES***********/
label.indent2 { margin-left: 25px; }
/****THIS MOVES CHECK BOX AND RADIO TEXT UP A BIT******************************/
label.upABit { position: relative;
top: -2px; }
/****THIS BOLDS < << > >> BUTTONS**********************************************/
b.bigFont { font-size: 135%; }
/****THESE ARE CUSTOM VERTICAL SPACING ELEMENTS********************************/
p.spacer { margin-bottom: -28px; }
p.elementSpacer { margin-bottom: -12px; }
p.elementSpacer2 { margin-bottom: -19px; }
p.elementSpacer3 { margin-bottom: -3px; }
p.elementSpacer4 { margin-bottom: 7px; }
p.elementSpacer5 { margin-bottom: 5px; }
p.elementSpacer6 { margin-bottom: -24px; }
p.elementSpacer7 { margin-bottom: -11px; }
p.elementSpacer8 { margin-bottom: -15px; }
p.elementSpacer9 { margin-bottom: -7px; }
p.elementSpacer10 { margin-bottom: 6px; }
p.elementSpacer11 { margin-bottom: -1px; }
p.elementSpacer12 { margin-bottom: -17px; }
p.elementSpacer13 { margin-bottom: -23px; }
p.elementSpacer14 { margin-bottom: -25px; }
p.elementSpacer15 { margin-bottom: -13px; }
p.elementSpacer16 { margin-bottom: -22px; }
p.elementSpacer17 { margin-bottom: -32px; }
p.elementSpacer18 { margin-bottom: -14px; }
p.elementSpacer19 { margin-bottom: -10px; }
p.elementSpacer21 { margin-bottom: -16px; }
p.elementSpacer22 { margin-bottom: 3px; }
/*CUSTOM STYLES FOR THE 'CONTENT' FRAME****************************************/
/******************************************************************************/
/*CUSTOM SPACING FOR MFC UI PAGE - SET UP FOR LOC PURPOSES*******************/
/**************************************************************************/
p.elementSpacer20 { margin-bottom: -13px; }
/*CUSTOM STYLE FOR MFC UI PAGE - SET UP FOR LOC PURPOSES*******************/
/**************************************************************************/
input.sideBtnLoc { width: 193px;
position: relative;
top: 3px; }
/*PLACES SPACE BETWEEN ADD/REMOVE BUTTONS**********************************/
/**************************************************************************/
span.spacer8 { width: 1px; }
/*SETS TEXT BOX TO APPROPRIATE WIDTH IN MFCAppWiz**************************/
/**************************************************************************/
#CLASS_NAMES { width: 399px; }
/*MOVES SELECT BOX UP IN CSharpIndexerWiz, Interface, Method,**************/
/*InterfaceMethod, AND MemFunctionWiz**************************************/
#PARAMETER_LIST { margin-top: -1px; }
/*MOVES SELECT BOX UP IN CSharpMethodWiz***********************************/
/**************************************************************************/
#PARAMETER_LIST1 { margin-top: -1px; }
/*SETS SELECTION BOX WIDTH IN CSharpInterfaceMethod AND CSharpMethodWiz****/
/**************************************************************************/
#PARAMETER_MODIFIER { width: 58px; }
/*SETS INDENT FOR ATLCustom AND MFCCustom Wizards**************************/
/**************************************************************************/
span.itemTextIndent1 { position: relative;
left: 8px;
top: -3px; }
/*SETS INDENT ON OBJECT FOR CSharpMethodWiz********************************/
/**************************************************************************/
span.customObjectIndent { margin-left: 8px; }
/*SETS CUSTOM INDENT FOR SECTION IN CSHARPMETHODWIZ************************/
/**************************************************************************/
span.sidebtn { position: relative;
top: 4px;
bottom: -3px; }
/*SETS CUSTOM INDENT FOR SECTION IN CSHARPMETHODWIZ************************/
/**************************************************************************/
span.itemtextspecial { position: relative;
top: -20px;
left: 9px;
bottom: -3px; }
/*SETS CUSTOM INDENT FOR SECTION IN CSHARPMETHODWIZ************************/
/**************************************************************************/
span.sidebtnspecial { position: relative;
top: -2px;
left: 53px;
bottom: -3px; }
/**************************************************************************/
/*MODIFIED POSITIONING*****************************************************/
/**************************************************************************/
/*Position and border change + link to the script file (absolutely needed)!!*/
table.three { table-layout: fixed;
height: 100%;
position: absolute;
left: -1px;
border-right: solid 2px Window; }
/*Color change*/
span.activeLink { color: WindowText;
text-decoration: none;
word-wrap: break-word;
cursor: hand;
width: 100%;
padding-top: 1px;
padding-bottom: 1px; }
/*Color change*/
span.activeLink2 { color: WindowText;
text-decoration: underline;
word-wrap: break-word;
cursor: hand;
width: 100%;
padding-top: 1px;
padding-bottom: 1px; }
/*Color change*/
span.inactiveLink { color: GrayText;
text-decoration: none;
word-wrap: break-word;
cursor: default;
width: 100%;
padding-top: 1px;
padding-bottom: 1px; }
/*Turned off dotted line*/
span.vertLine1 { height: 100%;
width: 1px;
position: absolute;
top: 0px;
left: -1px;
bottom: 0px;
z-index: 2; }
/*Style for width-control of the left-side links bar */
.LinkPane { width: 1.9in; }
/*Removed bolding of text*/
table.linkTextSelected { line-height: 95%;
width: 1.7in;
height: 2.6em;
position: relative;
left: 0.1in;
z-index: 2; }
/*Removed bolding of text and made width bigger*/
table.linkTextSelectedIndent { line-height: 95%;
width: 1.7in;
height: 2.6em;
position: relative;
top: -2px;
left: 0.2in;
z-index: 2; }
/*Changed left margin and position of top of element and made width bigger*/
table.linkTextIndent { line-height: 95%;
width: 1.6in;
height: 2.6em;
position: relative;
top: -2px;
left: 0.2in;
z-index: 2; }
/*Removed background color, changed top, and bottom margins*/
div.linkSelected { height: 2.6em;
position: relative;
top: -6px;
left: 0px;
right: 0px;
z-index: 1;
margin-bottom: -.7em; }
/*Changed top and bottom margins*/
div.link { height: 2em;
position: relative;
top: -6px;
left: 0px;
right: 0px;
z-index: 1;
margin-bottom: -.7em; }
/*Comment out
div.vertLine { background: url(Images/DottedVert.gif) repeat;
height: 125%;
width: 1px;
position: relative;
top: -12px;
left: -1px; }*/
/*Deleted dotted line*/
span.vertLine1 { height: 100%;
width: 1px;
position: absolute;
top: 0px;
left: -1px;
bottom: 0px;
z-index: 2; }
/*Changed background color and add alpha*/
td.three { background-color: Window;
filter: Alpha(Opacity = 25); }
/*Removed all background image modification elements and set image to 0 opacity*/
td.threeCustom { filter: Alpha(Opacity = 0); }
/*Comment out
td.dottedline { background: url(Images/DottedHori.gif) repeat; }*/
/*Removed border color*/
div.inlineA { position: relative;
top: 4px;
width: 100%;
height: 1px; }
/*Changed border color*/
div.inlineB { position: relative;
top: -9px;
margin-bottom: -20px;
width: 100%;
height: 1px;
border-top: solid ThreeDShadow 1px; }
/*Changed position of element*/
h4.head { font-weight: bold;
font-size: 10pt;
color: windowtext;
position: absolute;
top: 16px;
left: 120px;
height: 58px; }
/*Hide element*/
p.subhead { display: none;
color: windowtext;
position: relative;
top: -1.5em;
left: 1em; }
/*Changed alignment to right*/
td.image { text-align: left; }
/*Added item to control positioning of element*/
div.smallA { position: absolute;
top: 0px;
left: 12px;
height: 78px;
width: 110px;
vertical-align: bottom; }
/*Added item to control positioning of element - 1 misspelling in html so dup of above*/
div.smalA { position: absolute;
top: 0px;
left: 12px;
height: 78px;
width: 110px;
vertical-align: bottom; }
/*Added item to control positioning of element*/
div.small { position: absolute;
top: 0px;
left: 12px;
height: 78px;
width: 110px;
vertical-align: bottom; }
/*Added all positioning informaiton*/
img.smallest { background-color: activecaption;
position: relative;
bottom: 1px; }
/*Added item to control positioning of element*/
img.small { position: relative;
bottom: 1px; }
/*Add height specification*/
td.rule { background-color: window;
height: 1px; }
/*Info for new button*/
#PreviousBtn { position: relative;
right: -79px; }
/*Info for new button*/
#NextBtn { position: relative;
right: -79px; }
/*Reposition button*/
#FinishBtn { position: relative;
right: -79px; }
/*Reposition button*/
#CancelBtn { position: relative;
right: -79px; }
/*Hide button*/
#HelpBtn { display: none; }
/**************************************************************************/

View File

@ -0,0 +1,571 @@
<html dir="LTR">
<head>
<title>'MMSProjectTemplate'</title>
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<link id="LINKURL" rel="stylesheet" href="../../1033/NewStyles.css">
<symbol name='WIZARD_DIALOG_TITLE' type="text" value='MMSProjectTemplate'></symbol>
<symbol name='PLUGIN_TEMPLATE_NAME' type="text" value='MMSProjectTemplate'></symbol>
<symbol name='APP_TYPE_SUMMARY' type="text" value='//TODO: Application summary'></symbol>
<!--Function Hooks-->
<SYMBOL NAME='IServerGameDLL_ServerActivate' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameDLL_GameInit' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameDLL_GameFrame' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameDLL_GameShutdown' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameDLL_LevelInit' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameDLL_LevelShutdown' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameDLL_GetAllServerClasses' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameDLL_GetTickInterval' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameDLL_GetGameDescription' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameClients_ClientActive' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameClients_ClientConnect' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameClients_ClientDisconnect' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameClients_ClientCommand' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameClients_ClientPutInServer' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameClients_ClientSettingsChanged' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameClients_ClientSetupVisibility' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameClients_ClientEarPosition' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameClients_PostClientMessagesSent' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameClients_ProcessUsercmds' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameClients_NetworkIDValidated' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameClients_GetPlayerState' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameClients_GetPlayerLimits' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameClients_GetReplayDelay' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameClients_GetBugReportInfo' TYPE=checkbox VALUE=false></SYMBOL>
<SYMBOL NAME='IServerGameClients_SetCommandClient' TYPE=checkbox VALUE=false></SYMBOL>
</head>
<body bgcolor="BUTTONFACE" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" onload="InitDocument(document);" onkeydown="OnKey();" onkeypress="OnPress();">
<table class="ONE" height="100%" width="100%" border="0" cellpadding="0" cellspacing="0">
<col width="100%">
<!--OPEN OF INTRODUCTORY INFORMATION TABLE-->
<tr valign="TOP">
<td height="50" width="100%" colspan="2">
<table class="TWO" border="0" cellpadding="0" cellspacing="0">
<col width="12">
<col>
<col width="12">
<tr>
<td valign="TOP" width="12" style="height: 4px">
&nbsp;
</td>
<td valign="TOP" style="height: 4px">
&nbsp;
</td>
<td valign="TOP" width="12" style="height: 4px">
&nbsp;
</td>
<td class="IMAGE" valign="BOTTOM" width="110" rowspan="2">
<div class="SMALLA" id="Layer0">
<img class="SMALLEST" src="../../Images/MMSProjectTemplate.gif" alt="" border="0" style="left: -7px; bottom: -4px; width: 39px; height: 42px;">
</div>
</td>
<td valign="TOP" height="12" width="6" rowspan="2">
&nbsp;
</td>
</tr>
<tr>
<td valign="TOP" width="12" style="height: 59px">
&nbsp;
</td>
<td valign="TOP" style="height: 59px">
<h4 class="HEAD" id="HEAD" style="left: 46px; width: 500px; top: 3px">
Metamod Source Plugin Project Wizard<span style="font-size: 7pt"><br />
<br />
This wizard will help you configure a C++ Metamod Source plugin project.</span></h4>
<p class="SUBHEAD" id="SUBHEAD">
</p>
</td>
<td valign="TOP" width="12" style="height: 59px">
&nbsp;
</td>
</tr>
<tr>
<td valign="TOP" class="RULE" colspan="5" height="2">
<table border="0" width="100%" height="1" cellpadding="0" cellspacing="0">
<tr valign="TOP">
<td height="1" width="100%" bgcolor="BUTTONSHADOW">
<img src="../../Images/spacer.gif" height="1" width="1" alt=""></td>
<td height="1" width="1" bgcolor="WINDOW">
<img src="../../Images/spacer.gif" height="1" width="1" alt=""></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<!--CLOSE OF INTRODUCTORY INFORMATION TABLE-->
<!--OPEN OF NAVIGATION, CONTENT, AND BUTTON TABLES-->
<tr valign="TOP">
<td valign="TOP" style="height: 100%">
<!--OPEN OF CONTENT AND BUTTON TABLE-->
<table class="ONE" border="0" cellpadding="0" cellspacing="0">
<col width="100%">
<tr valign="TOP">
<td height="100%">
<!--OPEN OF CONTENT-->
<table class="CONTENT" border="0" cellpadding="0" cellspacing="0">
<col width="12">
<col width="185">
<col width="12">
<col width="185">
<col width="12">
<col width="185">
<col width="12">
<tr>
<td valign="TOP" height="12" colspan="5">
&nbsp;
</td>
</tr>
<tr valign="TOP">
<td valign="TOP" width="12">
&nbsp;
</td>
<td valign="TOP" colspan="3" style="width: 1px;">
<span class="itemTextTop">
<table>
<tr>
<td style="width: 232px;" align="left" valign="top">
<table>
<!--Author /////////////////////////////////////////////////////////////////////////////-->
<tr>
<td style="width: 280px">
Author:&nbsp; <em>This is the name of the author.<br />
</em>
<input id="PLUGIN_AUTHOR" style="width: 280px" type="text" value="metamodsource.net" /></td>
</tr>
<!--URL ////////////////////////////////////////////////////////////////////////////////-->
<tr>
<td style="width: 280px">
URL:&nbsp; <em>This is the URL to the author's web site<br />
</em>
<input id="PLUGIN_URL" style="width: 280px" type="text" value="http://www.metamodsource.net/" /></td>
</tr>
<!--License ////////////////////////////////////////////////////////////////////////////-->
<tr>
<td style="width: 280px">
License:&nbsp; <em>This is the plugin's license.<br />
</em>
<input id="PLUGIN_LICENSE" style="width: 280px" type="text" value='Copyright © 2008' /></td>
</tr>
<!--Plugin Name ////////////////////////////////////////////////////////////////////////-->
<tr>
<td style="width: 280px">
Plugin Name:&nbsp; <em>This is the name of the plugin.<br />
</em>
<input id="PLUGIN_NAME" style="width: 280px" type="text" value="MyMetamodPlugin" /></td>
</tr>
<!--Plugin Description /////////////////////////////////////////////////////////////////-->
<tr>
<td style="width: 280px">
Plugin Description:&nbsp; <em>This is the plugin's description.<br />
<input id="PLUGIN_DESC" style="width: 280px" type="text" value="My Metamod Plugin" /></em></td>
</tr>
<!--Plugin DLL /////////////////////////////////////////////////////////////////////////-->
<tr>
<td style="width: 280px">
Plugin DLL:&nbsp; <em>This is the name of the plugin's .dll file.</em><br />
<input id="PLUGIN_DLL" style="width: 280px" type="text" value="MyMetamodPlugin.dll" /></td>
</tr>
<!--Plugin Class ///////////////////////////////////////////////////////////////////////-->
<tr>
<td style="width: 280px">
Plugin Class: &nbsp; <em>This is the name of the plugin's class.</em><br />
<input id="PLUGIN_CLASS" style="width: 280px" type="text" value="CMyMetamodPlugin" /></td>
</tr>
</table>
</td>
<td align="left" style="width: 20px;" valign="top">
</td>
<td style="width: 238px;" align="left" valign="top">
<table>
<tr>
<td>
Function Hooks:&nbsp; <em>These functions will be auto generated.&nbsp;</em><br />
<div style="background: #fff; overflow: auto; height: 21.14em; border-left: 1px solid #404040; border-top: 1px solid #404040; border-bottom: 1px solid #404040; border-right: 1px solid #404040; width: 278px;">
<!--IServerGameDLL - ServerActivate /////////////////////////////////////////////////////////////////////////////-->
<label for='IServerGameDLL_ServerActivate' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameDLL_ServerActivate' name='checkbox[]'>IServerGameDLL - ServerActivate()
</label>
<!--IServerGameDLL - GameInit ///////////////////////////////////////////////////////////////////////////////////-->
<label for='IServerGameDLL_GameInit' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameDLL_GameInit' name='checkbox[]'>IServerGameDLL - GameInit()
</label>
<!--IServerGameDLL - GameFrame //////////////////////////////////////////////////////////////////////////////////-->
<label for='IServerGameDLL_GameFrame' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameDLL_GameFrame' name='checkbox[]'>IServerGameDLL - GameFrame()
</label>
<!--IServerGameDLL - GameShutdown ///////////////////////////////////////////////////////////////////////////////-->
<label for='IServerGameDLL_GameShutdown' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameDLL_GameShutdown' name='checkbox[]'>IServerGameDLL - GameShutdown()
</label>
<!--IServerGameDLL - LevelInit //////////////////////////////////////////////////////////////////////////////////-->
<label for='IServerGameDLL_LevelInit' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameDLL_LevelInit' name='checkbox[]'>IServerGameDLL - LevelInit()
</label>
<!--IServerGameDLL - LevelShutdown //////////////////////////////////////////////////////////////////////////////-->
<label for='IServerGameDLL_LevelShutdown' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameDLL_LevelShutdown' name='checkbox[]'>IServerGameDLL - LevelShutdown()
</label>
<!--IServerGameDLL - GetTickInterval ////////////////////////////////////////////////////////////////////////////-->
<label for='IServerGameDLL_GetAllServerClasses' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameDLL_GetAllServerClasses' name='checkbox[]'>IServerGameDLL - GetAllServerClasses()
</label>
<!--IServerGameDLL - GetTickInterval ////////////////////////////////////////////////////////////////////////////-->
<label for='IServerGameDLL_GetTickInterval' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameDLL_GetTickInterval' name='checkbox[]'>IServerGameDLL - GetTickInterval()
</label>
<!--IServerGameDLL - GetGameDescription /////////////////////////////////////////////////////////////////////////-->
<label for='IServerGameDLL_GetGameDescription' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameDLL_GetGameDescription' name='checkbox[]'>IServerGameDLL - GetGameDescription()
</label>
<!--IServerGameClients - ClientActive ///////////////////////////////////////////////////////////////////////////-->
<label for='IServerGameClients_ClientActive' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameClients_ClientActive' name='checkbox[]'>IServerGameClients - ClientActive()
</label>
<!--IServerGameClients - ClientConnect //////////////////////////////////////////////////////////////////////////-->
<label for='IServerGameClients_ClientConnect' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameClients_ClientConnect' name='checkbox[]'>IServerGameClients - ClientConnect()
</label>
<!--IServerGameClients - ClientDisconnect ///////////////////////////////////////////////////////////////////////-->
<label for='IServerGameClients_ClientDisconnect' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameClients_ClientDisconnect' name='checkbox[]'>IServerGameClients - ClientDisconnect()
</label>
<!--IServerGameClients - ClientCommand //////////////////////////////////////////////////////////////////////////-->
<label for='IServerGameClients_ClientCommand' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameClients_ClientCommand' name='checkbox[]'>IServerGameClients - ClientCommand()
</label>
<!--IServerGameClients - ClientPutInServer //////////////////////////////////////////////////////////////////////-->
<label for='IServerGameClients_ClientPutInServer' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameClients_ClientPutInServer' name='checkbox[]'>IServerGameClients - ClientPutInServer()
</label>
<!--IServerGameClients - ClientSettingsChanged //////////////////////////////////////////////////////////////////-->
<label for='IServerGameClients_ClientSettingsChanged' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameClients_ClientSettingsChanged' name='checkbox[]'>IServerGameClients - ClientSettingsChanged()
</label>
<!--IServerGameClients - ClientSetupVisibility //////////////////////////////////////////////////////////////////-->
<label for='IServerGameClients_ClientSetupVisibility' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameClients_ClientSetupVisibility' name='checkbox[]'>IServerGameClients - ClientSetupVisibility()
</label>
<!--IServerGameClients - ClientEarPosition //////////////////////////////////////////////////////////////////////-->
<label for='IServerGameClients_ClientEarPosition' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameClients_ClientEarPosition' name='checkbox[]'>IServerGameClients - ClientEarPosition()
</label>
<!--IServerGameClients - PostClientMessagesSent /////////////////////////////////////////////////////////////////-->
<label for='IServerGameClients_PostClientMessagesSent' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameClients_PostClientMessagesSent' name='checkbox[]'>IServerGameClients - PostClientMessagesSent()
</label>
<!--IServerGameClients - ProcessUsercmds ////////////////////////////////////////////////////////////////////////-->
<label for='IServerGameClients_ProcessUsercmds' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameClients_ProcessUsercmds' name='checkbox[]'>IServerGameClients - ProcessUsercmds()
</label>
<!--IServerGameClients - NetworkIDValidated /////////////////////////////////////////////////////////////////////-->
<label for='IServerGameClients_NetworkIDValidated' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameClients_NetworkIDValidated' name='checkbox[]'>IServerGameClients - NetworkIDValidated()
</label>
<!--IServerGameClients - GetPlayerState /////////////////////////////////////////////////////////////////////////-->
<label for='IServerGameClients_GetPlayerState' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameClients_GetPlayerState' name='checkbox[]'>IServerGameClients - GetPlayerState()
</label>
<!--IServerGameClients - GetPlayerLimits ////////////////////////////////////////////////////////////////////////-->
<label for='IServerGameClients_GetPlayerLimits' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameClients_GetPlayerLimits' name='checkbox[]'>IServerGameClients - GetPlayerLimits()
</label>
<!--IServerGameClients - GetReplayDelay /////////////////////////////////////////////////////////////////////////-->
<label for='IServerGameClients_GetReplayDelay' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameClients_GetReplayDelay' name='checkbox[]'>IServerGameClients - GetReplayDelay()
</label>
<!--IServerGameClients - GetBugReportInfo ///////////////////////////////////////////////////////////////////////-->
<label for='IServerGameClients_GetBugReportInfo' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameClients_GetBugReportInfo' name='checkbox[]'>IServerGameClients - GetBugReportInfo()
</label>
<!--IServerGameClients - SetCommandClient ///////////////////////////////////////////////////////////////////////-->
<label for='IServerGameClients_SetCommandClient' style='padding-left: 3px; padding-right: 3px; display: block;'>
<input class="CheckBox" type='checkbox' id='IServerGameClients_SetCommandClient' name='checkbox[]'>IServerGameClients - SetCommandClient()
</label>
</div>
<table>
<tr>
<td style="height: 22px; width: 50%;">
<input id="CHECK_ALL" style="width: 100%" type="button" value="Check All" onclick="OnCheckAll(document);" /></td>
<td style="height: 22px; width: 50%;">
<input id="UNCHECK_ALL" style="width: 100%" type="button" value="Uncheck All" onclick="OnUncheckAll(document);" /></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</span>
</td>
<td valign="TOP">
&nbsp;
</td>
</tr>
<tr>
<td valign="TOP" colspan="7">
&nbsp;
</td>
</tr>
</table>
<!--CLOSE OF CONTENT//-->
</td>
</tr>
<tr valign="BOTTOM">
<td height="48">
<!--OPEN OF BUTTON HTML//-->
<table height="48" border="0" cellpadding="0" cellspacing="0">
<col width="12">
<col>
<col width="75">
<col width="4">
<col width="75">
<col width="4">
<col width="75">
<col width="12">
<tr>
<td valign="TOP" class="RULE" colspan="8" style="height: 1px">
<table border="0" width="100%" height="1" cellpadding="0" cellspacing="0">
<tr valign="TOP">
<td height="1" width="100%" bgcolor="BUTTONSHADOW">
<img src="../../Images/spacer.gif" height="1" width="1" alt=""></td>
<td height="1" width="1" bgcolor="WINDOW">
<img src="../../Images/spacer.gif" height="1" width="1" alt=""></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="TOP" colspan="8" style="height: 11px">
&nbsp;
</td>
</tr>
<tr>
<td valign="MIDDLE" height="23" style="width: 12px">
&nbsp;
</td>
<td valign="TOP" height="23">
&nbsp;
</td>
<td valign="MIDDLE" height="23" width="75">
<button class="BUTTONS" id="FinishBtn" accesskey="F" onclick="OnFinish(document);">
<u>F</u>inish</button>
</td>
<td valign="MIDDLE" height="23" width="4">
&nbsp;
</td>
<td valign="MIDDLE" height="23" width="75">
<button class="BUTTONS" id="CancelBtn" accesskey="C" onclick="window.external.Finish(document, 'cancel');">
<u>C</u>ancel</button>
</td>
<td valign="MIDDLE" height="23" width="4">
&nbsp;
</td>
<td valign="MIDDLE" height="23" style="width: 75px">
<button class="BUTTONS" id="HelpBtn" accesskey="H" onclick="window.external.OnHelp('vc.appwiz.custom.overview');">
<u>H</u>elp</button>
</td>
<td valign="MIDDLE" height="23" style="width: 12px">
&nbsp;
</td>
</tr>
<tr>
<td valign="TOP" colspan="8" style="height: 17px">
&nbsp;
</td>
</tr>
</table>
<!--CLOSE OF BUTTON HTML//-->
</td>
</tr>
</table>
<!--CLOSE OF NAVIGATION, CONTENT, AND BUTTON TABLES//-->
</td>
</tr>
</table>
</body>
</html>
<script language="JSCRIPT">
// This is an example of a function which initializes the page
function InitDocument(document)
{
setDirection();
if (window.external.FindSymbol('DOCUMENT_FIRST_LOAD'))
{
// This function sets the default symbols based
// on the values specified in the SYMBOL tags above
window.external.SetDefaults(document);
}
// Load the document and initialize the controls
// with the appropriate symbol values
window.external.Load(document);
// Initialize the default values
var author = document.getElementById("PLUGIN_AUTHOR").value;
var project_name = window.external.FindSymbol("PROJECT_NAME");
var strip_name = project_name.replace(/ /g, "");
document.getElementById("PLUGIN_LICENSE").value = "Copyright © 2008 " + author;
document.getElementById("PLUGIN_NAME").value = strip_name;
document.getElementById("PLUGIN_DESC").value = "Metamod Source Plugin: " + strip_name;
document.getElementById("PLUGIN_DLL").value = strip_name + ".dll";
document.getElementById("PLUGIN_CLASS").value = "C" + strip_name;
}
// Checks all functions in the list
function OnCheckAll(document)
{
var a=0;
var check_boxes = document.getElementsByName('checkbox[]');
for(a=0; a<check_boxes.length; a++)
{
check_boxes[a].checked = true;
}
}
// Unchecks all functions in the list
function OnUncheckAll(document)
{
var a=0;
var check_boxes = document.getElementsByName('checkbox[]');
for(a=0; a<check_boxes.length; a++)
{
check_boxes[a].checked = false;
}
}
// If the wizard has more than 1 page, this
// function will browse to the page specified
function Next(document, linkto)
{
window.external.Next(document, linkto);
}
// This is an example of a function which
// gets called when the user clicks on 'Finish'
function OnFinish(document)
{
//var checkBox = document.getElementById(boxID);
//checkBoxValue = checkBox.value;
OnWizFinish(document);
}
</script>
<script id="INCLUDE_SCRIPT" language="JSCRIPT"></script>
<script id="INCLUDE_COMMON" language="JSCRIPT"></script>
<!--
Common.js is a script file which contains the helper functions
used by the wizards. Include this line if you want to
call these functions from your html scripts.
//-->
<script>
var strPath = window.external.FindSymbol("PRODUCT_INSTALLATION_DIR");
strPath += "VCWizards/";
strPath += window.external.GetHostLocale();
var strScriptPath = strPath + "/Script.js";
var strCommonPath = strPath + "/Common.js";
document.scripts("INCLUDE_SCRIPT").src = strScriptPath;
document.scripts("INCLUDE_COMMON").src = strCommonPath;
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1,497 @@
///////////////////////////////////////////////////////////////////////////////////////////
// //
// //
// File: Default.js //
// //
// //
///////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////
// Use wizard.ReportError to display a message box for debugging
// wizard.ReportError("<your message here>", true);
///////////////////////////////////////////////////////////////////////////////////////////
// OnFinish
function OnFinish(selProj, selObj)
{
try
{
// Get the new project name and path
var strProjectName = wizard.FindSymbol('PROJECT_NAME');
var strProjectPath = wizard.FindSymbol('PROJECT_PATH');
var strProjectTemplateName = wizard.FindSymbol('PLUGIN_TEMPLATE_NAME'); // Defined in default.htm
// Get the current date and add a symbol CURRENT_DATE
var curr_time = new Date();
var month = curr_time.getMonth() + 1;
var day = curr_time.getDate();
var year = curr_time.getFullYear();
var today = year + '-' + month + '-' + day;
wizard.AddSymbol('CURRENT_DATE', today);
// Set the path to where the template is installed
var strPluginPath = wizard.FindSymbol('PROJECT_TEMPLATE_PATH') +
"\\AppWiz\\Metamod\\" +
strProjectTemplateName + "\\";
wizard.AddSymbol('PLUGIN_INSTALL_PATH', strPluginPath);
wizard.AddSymbol('PLUGIN_SOURCE_FILES', "Plugin Source Files");
wizard.AddSymbol('PLUGIN_HEADER_FILES', "Plugin Header Files");
wizard.AddSymbol('PLUGIN_RESOURCE_FILES', "Resource Files");
// Create the custom project
selProj = CreateCustomProject(strProjectName, strProjectPath);
AddConfig(selProj, strProjectName);
AddFilters(selProj);
// Create the custom .inf file
var InfFile = CreateCustomInfFile();
AddFilesToCustomProj(selProj, strProjectName, strProjectPath, InfFile);
PchSettings(selProj);
InfFile.Delete();
// Save the project
selProj.Object.Save();
}
// Catch Exceptions
catch(ex)
{
if(ex.description.length != 0)
{
SetErrorInfo(ex);
}
return ex.number
}
}
///////////////////////////////////////////////////////////////////////////////////////////
// CreateCustomProject
function CreateCustomProject(strProjectName, strProjectPath)
{
try
{
// Create the project's solution
var strInstallPath = wizard.FindSymbol('PLUGIN_INSTALL_PATH');
var strProjTemplate = strInstallPath + '\\Templates\\1033\\plugin.vcproj';
if(wizard.FindSymbol("CLOSE_SOLUTION"))
{
var Solution = dte.Solution;
Solution.Close();
var strSolutionName = wizard.FindSymbol("VS_SOLUTION_NAME");
if(strSolutionName.length)
{
var strSolutionPath = strProjectPath.substr(0, strProjectPath.length - strProjectName.length);
Solution.Create(strSolutionPath, strSolutionName);
}
}
// Override the new solution with our custom plugin.vcproj file
var oTarget = wizard.FindSymbol("TARGET");
var strProjectNameWithExt = strProjectName + '.vcproj';
if(wizard.FindSymbol("WIZARD_TYPE") == vsWizardAddSubProject)
{
return oTarget.AddFromTemplate(strProjTemplate, strProjectNameWithExt).SubProject;
}
return oTarget.AddFromTemplate(strProjTemplate, strProjectPath, strProjectNameWithExt);
}
// Catch Exceptions
catch(ex)
{
throw ex;
}
}
///////////////////////////////////////////////////////////////////////////////////////////
// CreateCustomInfFile
function CreateCustomInfFile()
{
try
{
var fso = new ActiveXObject('Scripting.FileSystemObject');
var TemporaryFolder = 2;
var tfolder = fso.GetSpecialFolder(TemporaryFolder);
var strTempFolder = tfolder.Drive + '\\' + tfolder.Name;
var strWizTempFile = strTempFolder + "\\" + fso.GetTempName();
var strTemplatePath = wizard.FindSymbol('TEMPLATES_PATH');
var strInfFile = strTemplatePath + '\\Templates.inf';
wizard.RenderTemplate(strInfFile, strWizTempFile);
return fso.GetFile(strWizTempFile);
}
// Catch Exceptions
catch(ex)
{
throw ex;
}
}
///////////////////////////////////////////////////////////////////////////////////////////
// DelFile
function DelFile(fso, strWizTempFile)
{
try
{
// Delete the file
if(fso.FileExists(strWizTempFile))
{
var tmpFile = fso.GetFile(strWizTempFile);
tmpFile.Delete();
}
}
// Catch Exceptions
catch(ex)
{
throw ex;
}
}
///////////////////////////////////////////////////////////////////////////////////////////
// AddFilters
function AddFilters(proj)
{
// Our plugin.vcproj has filters
}
///////////////////////////////////////////////////////////////////////////////////////////
// AddConfig
function AddConfig(proj, strProjectName)
{
try
{
// Get the plugin dll name
var plugin_dll = wizard.FindSymbol('PLUGIN_DLL');
if(plugin_dll.indexOf(".dll") < 0)
{
plugin_dll = plugin_dll + ".dll";
}
var project_exports = strProjectName.toUpperCase() + "_EXPORTS";
project_exports = project_exports.replace(/ /g, "_") + ";";
// Debug - Original -> Configuration Properties -> C/C++ -> Preprocessor
var config = proj.Object.Configurations('Debug - Original');
var CLTool = config.Tools('VCCLCompilerTool');
var LinkTool = config.Tools('VCLinkerTool');
CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions;
LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll;
// Release - Original -> Configuration Properties -> C/C++ -> Preprocessor
config = proj.Object.Configurations('Release - Original');
CLTool = config.Tools('VCCLCompilerTool');
LinkTool = config.Tools('VCLinkerTool');
CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions;
LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll;
// Debug - Orange Box -> Configuration Properties -> C/C++ -> Preprocessor
config = proj.Object.Configurations('Debug - Orange Box');
CLTool = config.Tools('VCCLCompilerTool');
LinkTool = config.Tools('VCLinkerTool');
CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions;
LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll;
// Release - Orange Box -> Configuration Properties -> C/C++ -> Preprocessor
config = proj.Object.Configurations('Release - Orange Box');
CLTool = config.Tools('VCCLCompilerTool');
LinkTool = config.Tools('VCLinkerTool');
CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions;
LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll;
// Debug - Left 4 Dead -> Configuration Properties -> C/C++ -> Preprocessor
config = proj.Object.Configurations('Debug - Left 4 Dead');
CLTool = config.Tools('VCCLCompilerTool');
LinkTool = config.Tools('VCLinkerTool');
CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions;
LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll;
// Release - Left 4 Dead -> Configuration Properties -> C/C++ -> Preprocessor
config = proj.Object.Configurations('Release - Left 4 Dead');
CLTool = config.Tools('VCCLCompilerTool');
LinkTool = config.Tools('VCLinkerTool');
CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions;
LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll;
}
// Catch Exceptions
catch(ex)
{
throw ex;
}
}
///////////////////////////////////////////////////////////////////////////////////////////
// PchSettings
function PchSettings(proj)
{
// TODO: specify pch settings
}
///////////////////////////////////////////////////////////////////////////////////////////
// GetTargetName
function GetTargetName(strName)
{
try
{
var strTarget = strName;
var strPluginName = wizard.FindSymbol('PLUGIN_NAME');
var strPluginClass = wizard.FindSymbol('PLUGIN_CLASS');
// Target ReadMe File
if(strName == "ReadMe.txt")
{
strTarget = "ReadMe.txt";
}
// Target StdMMS File
else if(strName == "StdMMS.h")
{
strTarget = "StdMMS.h";
}
// Target plugin_mm File
else if(strName == "plugin_mm.h")
{
strTarget = "Plugin\\" + strPluginClass + ".h";
}
// Target plugin_mm File
else if(strName == "plugin_mm.cpp")
{
strTarget = "Plugin\\" + strPluginClass + ".cpp";
}
// Target plugin_hooks File
else if(strName == "plugin_hooks.h")
{
strTarget = "Plugin\\" + strPluginClass + "Hooks.h";
}
// Target plugin_hooks File
else if(strName == "plugin_hooks.cpp")
{
strTarget = "Plugin\\" + strPluginClass + "Hooks.cpp";
}
// Target plugin_engine File
else if(strName == "plugin_engine.h")
{
strTarget = "Plugin\\" + strPluginClass + "Engine.h";
}
// Target plugin_mm File
else if(strName == "plugin.vdf")
{
if(strPluginName.length)
{
strPluginName = strPluginName.replace(/ /g, "");
strTarget = "Bin\\" + strPluginName + ".vdf";
}
}
return strTarget;
}
// Catch Exceptions
catch(ex)
{
throw ex;
}
}
///////////////////////////////////////////////////////////////////////////////////////////
// AddFilesToCustomProj
function AddFilesToCustomProj(proj, strProjectName, strProjectPath, InfFile)
{
try
{
var vcProjectItems = proj.ProjectItems;
var vcProjectFilters = proj.Object.Filters;
// Get references to the filters of the project
var vcFilterSource = vcProjectFilters.Item(wizard.FindSymbol('PLUGIN_SOURCE_FILES'));
var vcFilterHeader = vcProjectFilters.Item(wizard.FindSymbol('PLUGIN_HEADER_FILES'));
var vcFilterRez = vcProjectFilters.Item(wizard.FindSymbol('PLUGIN_RESOURCE_FILES'));
var strTemplatePath = wizard.FindSymbol('PLUGIN_INSTALL_PATH') + "Templates\\1033\\";
var FileStream = InfFile.OpenAsTextStream(1, -2);
// Process the template files
while(!FileStream.AtEndOfStream)
{
var strLine = FileStream.ReadLine();
if(strLine == '')
{
continue;
}
// Retrieve the file parameters
var strName = strLine;
var strTargetFile = GetTargetName(strName);
var strTemplateFile = strTemplatePath + '\\' + strLine;
var strProjectFile = strProjectPath + '\\' + strTargetFile;
// "true" will only copy the file from template_file
// to target_file without rendering / adding to the project
var bCopyOnly = false;
var strExt = strName.substr(strName.lastIndexOf("."));
if(strExt == ".bmp" ||
strExt == ".ico" ||
strExt == ".gif" ||
strExt == ".rtf" ||
strExt == ".css")
{
bCopyOnly = true;
}
wizard.RenderTemplate(strTemplateFile, strProjectFile, bCopyOnly);
if(!KeepOutsideProject(strName))
{
// Add source files to the 'Plugin Source Files' filter
if(strExt == '.cpp' ||
strExt == '.cxx' ||
strExt == '.c')
{
vcFilterSource.AddFile(strTargetFile);
}
// Add header files to the 'Plugin Header Files' filter
else if(strExt == '.hpp' ||
strExt == '.h')
{
vcFilterHeader.AddFile(strTargetFile);
}
// Add resource files to the 'Resource Files' filter
else if(strExt == '.rc2' || strExt == '.ico' ||
strExt == '.gif' || strExt == '.bmp' ||
strExt == '.vdf' || strExt == '.rc')
{
vcFilterRez.AddFile(strTargetFile);
}
// Just add the rest to the project
else
{
proj.Object.AddFile(strTargetFile);
}
}
}
FileStream.Close();
}
// Catch Exceptions
catch(ex)
{
throw ex;
}
}
///////////////////////////////////////////////////////////////////////////////////////////
// KeepOutsideProject
function KeepOutsideProject(strName)
{
try
{
var bAdd = false;
if(strName == "ReadMe.txt")
{
bAdd = true;
}
return bAdd;
}
// Catch Exceptions
catch(ex)
{
throw ex;
}
}

View File

@ -0,0 +1,5 @@
========================================================================
[!output PLUGIN_NAME] : Project Overview
========================================================================
MMS Plugin Project has created this [!output PLUGIN_NAME] project for you as a starting point.

View File

@ -0,0 +1,44 @@
///////////////////////////////////////////////////////////////////////////////
//
// File: StdMMS.h
// Author: [!output PLUGIN_AUTHOR]
// Date: [!output CURRENT_DATE]
//
// License: [!output PLUGIN_LICENSE]
//
// This software is provided 'as-is', without any express or
// implied warranty. In no event will the authors be held liable
// for any damages arising from the use of this software.
//
// Based on code written by AlliedModders LLC. Sample Plugin
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _StdMMS_H
#define _StdMMS_H
///////////////////////////////////////////////////////
// Include Standard Headers
#include <stdio.h>
///////////////////////////////////////////////////////
// Include MetaMod Headers
#include <ISmmPlugin.h>
#include <IGameEvents.h>
#include <IPlayerInfo.h>
#include <Sh_Vector.h>
///////////////////////////////////////////////////////
// Include [!output PROJECT_NAME] Headers
#include "Plugin/[!output PLUGIN_CLASS]Hooks.h"
#include "Plugin/[!output PLUGIN_CLASS].h"
#include "Plugin/[!output PLUGIN_CLASS]Engine.h"
// TODO: Add your own headers here.
// ex. #include "MyCode/MyInclude.h"
#endif // _StdMMS_H

View File

@ -0,0 +1,8 @@
StdMMS.h
plugin_mm.h
plugin_mm.cpp
plugin_hooks.h
plugin_hooks.cpp
plugin_engine.h
plugin.vdf
ReadMe.txt

View File

@ -0,0 +1,212 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject ProjectType="Visual C++">
<!-- Platforms ////////////////////////////////////////////////////////////// -->
<Platforms>
<Platform Name="Win32"/>
</Platforms>
<!-- Configurations ///////////////////////////////////////////////////////// -->
<Configurations>
<!-- Debug - Original /////////////////// -->
<Configuration Name="Debug - Original|Win32"
OutputDirectory=".\Build\$(ConfigurationName)"
IntermediateDirectory=".\Build\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2">
<Tool Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
Optimization="0"
AdditionalIncludeDirectories="&quot;.\&quot;;&quot;..\&quot;;&quot;..\..\&quot;;&quot;$(MMSOURCE17)\core-legacy&quot;;&quot;$(MMSOURCE17)\core-legacy\sourcehook&quot;;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(HL2SDK)\public\vstdlib&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SOURCE_ENGINE=2;"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"/>
<Tool Name="VCLinkerTool"
AdditionalDependencies="tier0.lib tier1.lib vstdlib.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;$(HL2SDK)\lib\public\&quot;"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"/>
</Configuration>
<!-- Release - Original ///////////////// -->
<Configuration Name="Release - Original|Win32"
OutputDirectory=".\Build\$(ConfigurationName)"
IntermediateDirectory=".\Build\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
WholeProgramOptimization="1">
<Tool Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalIncludeDirectories="&quot;.\&quot;;&quot;..\&quot;;&quot;..\..\&quot;;&quot;$(MMSOURCE17)\core-legacy&quot;;&quot;$(MMSOURCE17)\core-legacy\sourcehook&quot;;&quot;$(HL2SDK)\public&quot;;&quot;$(HL2SDK)\public\dlls&quot;;&quot;$(HL2SDK)\public\engine&quot;;&quot;$(HL2SDK)\public\tier0&quot;;&quot;$(HL2SDK)\public\tier1&quot;;&quot;$(HL2SDK)\public\vstdlib&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SOURCE_ENGINE=2;"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"/>
<Tool Name="VCLinkerTool"
AdditionalDependencies="tier0.lib tier1.lib vstdlib.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(HL2SDK)\lib\public\&quot;"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
</Configuration>
<!-- Debug - Orange Box ///////////////// -->
<Configuration Name="Debug - Orange Box|Win32"
OutputDirectory=".\Build\$(ConfigurationName)"
IntermediateDirectory=".\Build\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2">
<Tool Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
Optimization="0"
AdditionalIncludeDirectories="&quot;.\&quot;;&quot;..\&quot;;&quot;..\..\&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(HL2SDKOB)\public\vstdlib&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SOURCE_ENGINE=3;"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"/>
<Tool Name="VCLinkerTool"
AdditionalDependencies="tier0.lib tier1.lib vstdlib.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;$(HL2SDKOB)\lib\public\&quot;"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"/>
</Configuration>
<!-- Release - Orange Box /////////////// -->
<Configuration Name="Release - Orange Box|Win32"
OutputDirectory=".\Build\$(ConfigurationName)"
IntermediateDirectory=".\Build\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
WholeProgramOptimization="1">
<Tool Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalIncludeDirectories="&quot;.\&quot;;&quot;..\&quot;;&quot;..\..\&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKOB)\public&quot;;&quot;$(HL2SDKOB)\public\engine&quot;;&quot;$(HL2SDKOB)\public\game\server&quot;;&quot;$(HL2SDKOB)\public\tier0&quot;;&quot;$(HL2SDKOB)\public\tier1&quot;;&quot;$(HL2SDKOB)\public\vstdlib&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SOURCE_ENGINE=3;"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"/>
<Tool Name="VCLinkerTool"
AdditionalDependencies="tier0.lib tier1.lib vstdlib.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(HL2SDKOB)\lib\public\&quot;"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
</Configuration>
<!-- Debug - Left 4 Dead //////////////// -->
<Configuration Name="Debug - Left 4 Dead|Win32"
OutputDirectory=".\Build\$(ConfigurationName)"
IntermediateDirectory=".\Build\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2">
<Tool Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
Optimization="0"
AdditionalIncludeDirectories="&quot;.\&quot;;&quot;..\&quot;;&quot;..\..\&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(HL2SDKL4D)\public\vstdlib&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SOURCE_ENGINE=4;"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"/>
<Tool Name="VCLinkerTool"
AdditionalDependencies="tier0.lib tier1.lib vstdlib.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;$(HL2SDKL4D)\lib\public\&quot;"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMT"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"/>
</Configuration>
<!-- Release - Left 4 Dead ////////////// -->
<Configuration Name="Release - Left 4 Dead|Win32"
OutputDirectory=".\Build\$(ConfigurationName)"
IntermediateDirectory=".\Build\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="2"
WholeProgramOptimization="1">
<Tool Name="VCCLCompilerTool"
AdditionalOptions="/D SE_EPISODEONE=2 /D SE_ORANGEBOX=3 /D SE_LEFT4DEAD=4"
AdditionalIncludeDirectories="&quot;.\&quot;;&quot;..\&quot;;&quot;..\..\&quot;;&quot;$(MMSOURCE17)\core&quot;;&quot;$(MMSOURCE17)\core\sourcehook&quot;;&quot;$(HL2SDKL4D)\public&quot;;&quot;$(HL2SDKL4D)\public\engine&quot;;&quot;$(HL2SDKL4D)\public\game\server&quot;;&quot;$(HL2SDKL4D)\public\tier0&quot;;&quot;$(HL2SDKL4D)\public\tier1&quot;;&quot;$(HL2SDKL4D)\public\vstdlib&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SOURCE_ENGINE=4;"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"/>
<Tool Name="VCLinkerTool"
AdditionalDependencies="tier0.lib tier1.lib vstdlib.lib"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(HL2SDKL4D)\lib\public\&quot;"
IgnoreDefaultLibraryNames="LIBC;LIBCD;LIBCMTD"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
</Configuration>
</Configurations>
<!-- Files //////////////////////////////////////// -->
<Files>
<Filter Name="Plugin Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
</Filter>
<Filter Name="Plugin Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
</Filter>
<Filter Name="Resource Files"
Filter="vdf;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
</Filter>
</Files>
</VisualStudioProject>

View File

@ -0,0 +1,5 @@
"Metamod Plugin"
{
"alias" "[!output PLUGIN_NAME]"
"file" "Addons/Metamod/Plugins/[!output PLUGIN_NAME]/Bin/[!output PLUGIN_DLL]"
}

View File

@ -0,0 +1,124 @@
///////////////////////////////////////////////////////////////////////////////
//
// File: [!output PLUGIN_CLASS]Engine.h
// Author: [!output PLUGIN_AUTHOR]
// Date: [!output CURRENT_DATE]
//
// License: [!output PLUGIN_LICENSE]
//
// This software is provided 'as-is', without any express or
// implied warranty. In no event will the authors be held liable
// for any damages arising from the use of this software.
//
// Based on code written by AlliedModders LLC. Sample Plugin
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _MMS_ENGINE_H
#define _MMS_ENGINE_H
#include <eiface.h>
/////////////////////////////////////////////////////////////////////////
// Class [!output PLUGIN_CLASS]
class [!output PLUGIN_CLASS];
/////////////////////////////////////////////////////////////////////////
// Episode One
#if SOURCE_ENGINE == SE_EPISODEONE
/////////////////////////////////////////////////////////////////////////
#if !defined METAMOD_PLAPI_VERSION
#define GetEngineFactory engineFactory
#define GetServerFactory serverFactory
#define MM_Format snprintf
#define GetCGlobals pGlobals
#else
#error "Metamod:Source 1.6 is not supported on the old engine."
#endif
/////////////////////////////////////////////////////////////////////////
// Wrap the CCommand class so our code looks the same for both engines.
class CCommand
{
public:
const char *ArgS()
{
return [!output PLUGIN_CLASS]::EngineServer->Cmd_Args();
}
int ArgC()
{
return [!output PLUGIN_CLASS]::EngineServer->Cmd_Argc();
}
const char *Arg(int index)
{
return [!output PLUGIN_CLASS]::EngineServer->Cmd_Argv(index);
}
};
#define CVAR_INTERFACE_VERSION VENGINE_CVAR_INTERFACE_VERSION
#define ENGINE_CALL(func) SH_CALL(m_engine_server, func)
/////////////////////////////////////////////////////////////////////////
// Episode Orange Box or newer
#elif SOURCE_ENGINE >= SE_ORANGEBOX
#define ENGINE_CALL(func) SH_CALL([!output PLUGIN_CLASS]::EngineServer, func)
#define MM_Format g_SMAPI->Format
#endif
/////////////////////////////////////////////////////////////////////////
// Left 4 Dead engine removed these from IVEngineServer
#if SOURCE_ENGINE >= SE_LEFT4DEAD
inline int IndexOfEdict(const edict_t* edict)
{
return (int)(edict - [!output PLUGIN_CLASS]::GlobalVars->baseEdict);
}
inline edict_t* PEntityOfEntIndex(int entity_index)
{
if (entity_index >= 0 && entity_index < [!output PLUGIN_CLASS]::GlobalVars->maxEntities)
{
return (edict_t *)([!output PLUGIN_CLASS]::GlobalVars->baseEdict + entity_index);
}
return NULL;
}
#else
inline int IndexOfEdict(const edict_t* edict)
{
return [!output PLUGIN_CLASS]::EngineServer->IndexOfEdict(edict);
}
inline edict_t* PEntityOfEntIndex(int entity_index)
{
return [!output PLUGIN_CLASS]::EngineServer->PEntityOfEntIndex(entity_index);
}
#endif
/////////////////////////////////////////////////////////////////////////
// Define snprintf
#if defined WIN32 && !defined snprintf
#define snprintf _snprintf
#endif
#endif // _MMS_ENGINE_H

View File

@ -0,0 +1,675 @@
///////////////////////////////////////////////////////////////////////////////
//
// File: [!output PLUGIN_CLASS]Hooks.cpp
// Author: [!output PLUGIN_AUTHOR]
// Date: [!output CURRENT_DATE]
//
// License: [!output PLUGIN_LICENSE]
//
// This software is provided 'as-is', without any express or
// implied warranty. In no event will the authors be held liable
// for any damages arising from the use of this software.
//
// Based on code written by AlliedModders LLC. Sample Plugin
//
///////////////////////////////////////////////////////////////////////////////
#include "StdMMS.h"
/////////////////////////////////////////////////////////////////////////
// Declare the Hooks
[!if IServerGameDLL_ServerActivate]
SH_DECL_HOOK3_void(IServerGameDLL, ServerActivate, SH_NOATTRIB, 0, edict_t*, int, int);
[!endif]
[!if IServerGameDLL_GameInit]
SH_DECL_HOOK0(IServerGameDLL, GameInit, SH_NOATTRIB, 0, bool);
[!endif]
[!if IServerGameDLL_GameFrame]
SH_DECL_HOOK1_void(IServerGameDLL, GameFrame, SH_NOATTRIB, 0, bool);
[!endif]
[!if IServerGameDLL_GameShutdown]
SH_DECL_HOOK0_void(IServerGameDLL, GameShutdown, SH_NOATTRIB, 0);
[!endif]
[!if IServerGameDLL_LevelInit]
SH_DECL_HOOK6(IServerGameDLL, LevelInit, SH_NOATTRIB, 0, bool, char const*, char const*, char const*, char const*, bool, bool);
[!endif]
[!if IServerGameDLL_LevelShutdown]
SH_DECL_HOOK0_void(IServerGameDLL, LevelShutdown, SH_NOATTRIB, 0);
[!endif]
[!if IServerGameDLL_GetAllServerClasses]
SH_DECL_HOOK0(IServerGameDLL, GetAllServerClasses, SH_NOATTRIB, 0, ServerClass*);
[!endif]
[!if IServerGameDLL_GetTickInterval]
SH_DECL_HOOK0(IServerGameDLL, GetTickInterval, const, 0, float);
[!endif]
[!if IServerGameDLL_GetGameDescription]
SH_DECL_HOOK0(IServerGameDLL, GetGameDescription, SH_NOATTRIB, 0, const char*);
[!endif]
[!if IServerGameClients_ClientActive]
SH_DECL_HOOK2_void(IServerGameClients, ClientActive, SH_NOATTRIB, 0, edict_t*, bool);
[!endif]
[!if IServerGameClients_ClientConnect]
SH_DECL_HOOK5(IServerGameClients, ClientConnect, SH_NOATTRIB, 0, bool, edict_t*, const char*, const char *, char *, int);
[!endif]
[!if IServerGameClients_ClientDisconnect]
SH_DECL_HOOK1_void(IServerGameClients, ClientDisconnect, SH_NOATTRIB, 0, edict_t*);
[!endif]
[!if IServerGameClients_ClientPutInServer]
SH_DECL_HOOK2_void(IServerGameClients, ClientPutInServer, SH_NOATTRIB, 0, edict_t*, char const *);
[!endif]
[!if IServerGameClients_ClientSettingsChanged]
SH_DECL_HOOK1_void(IServerGameClients, ClientSettingsChanged, SH_NOATTRIB, 0, edict_t*);
[!endif]
[!if IServerGameClients_ClientSetupVisibility]
SH_DECL_HOOK4_void(IServerGameClients, ClientSetupVisibility, SH_NOATTRIB, 0, edict_t*, edict_t*, unsigned char*, int);
[!endif]
[!if IServerGameClients_ClientEarPosition]
SH_DECL_HOOK2_void(IServerGameClients, ClientEarPosition, SH_NOATTRIB, 0, edict_t*, Vector*);
[!endif]
[!if IServerGameClients_PostClientMessagesSent]
SH_DECL_HOOK0_void(IServerGameClients, PostClientMessagesSent, SH_NOATTRIB, 0);
[!endif]
[!if IServerGameClients_ProcessUsercmds]
SH_DECL_HOOK7(IServerGameClients, ProcessUsercmds, SH_NOATTRIB, 0, float, edict_t*, bf_read*, int, int, int, bool, bool);
[!endif]
[!if IServerGameClients_GetPlayerLimits]
SH_DECL_HOOK3_void(IServerGameClients, GetPlayerLimits, const, 0, int&, int&, int&);
[!endif]
[!if IServerGameClients_GetPlayerState]
SH_DECL_HOOK1(IServerGameClients, GetPlayerState, SH_NOATTRIB, 0, CPlayerState*, edict_t*);
[!endif]
[!if IServerGameClients_GetReplayDelay]
SH_DECL_HOOK2(IServerGameClients, GetReplayDelay, SH_NOATTRIB, 0, int, edict_t*, int&);
[!endif]
[!if IServerGameClients_GetBugReportInfo]
SH_DECL_HOOK2_void(IServerGameClients, GetBugReportInfo, SH_NOATTRIB, 0, char*, int);
[!endif]
[!if IServerGameClients_SetCommandClient]
SH_DECL_HOOK1_void(IServerGameClients, SetCommandClient, SH_NOATTRIB, 0, int);
[!endif]
SH_DECL_HOOK2(IGameEventManager2, FireEvent, SH_NOATTRIB, 0, bool, IGameEvent*, bool);
#if SOURCE_ENGINE >= SE_ORANGEBOX
[!if IServerGameClients_NetworkIDValidated]
SH_DECL_HOOK2_void(IServerGameClients, NetworkIDValidated, SH_NOATTRIB, 0, const char *, const char *);
[!endif]
[!if IServerGameClients_ClientCommand]
SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t*, const CCommand&);
[!endif]
#else
[!if IServerGameClients_ClientCommand]
SH_DECL_HOOK1_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t*);
[!endif]
#endif
/////////////////////////////////////////////////////////////////////////
// AddHooks
void [!output PLUGIN_CLASS]::AddHooks()
{
// Add the ServerGameDLL hooks
[!if IServerGameDLL_ServerActivate]
SH_ADD_HOOK_MEMFUNC(IServerGameDLL, ServerActivate, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedServerActivate, true);
[!endif]
[!if IServerGameDLL_GameInit]
SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GameInit, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGameInit, true);
[!endif]
[!if IServerGameDLL_GameFrame]
SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GameFrame, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGameFrame, true);
[!endif]
[!if IServerGameDLL_GameShutdown]
SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GameShutdown, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGameShutdown, true);
[!endif]
[!if IServerGameDLL_LevelInit]
SH_ADD_HOOK_MEMFUNC(IServerGameDLL, LevelInit, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedLevelInit, true);
[!endif]
[!if IServerGameDLL_LevelShutdown]
SH_ADD_HOOK_MEMFUNC(IServerGameDLL, LevelShutdown, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedLevelShutdown, true);
[!endif]
[!if IServerGameDLL_GetAllServerClasses]
SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GetAllServerClasses, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGetAllServerClasses, true);
[!endif]
[!if IServerGameDLL_GetTickInterval]
SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GetTickInterval, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGetTickInterval, true);
[!endif]
[!if IServerGameDLL_GetGameDescription]
SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GetGameDescription, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGetGameDescription, true);
[!endif]
// Add the ServerGameClients hooks
[!if IServerGameClients_ClientActive]
SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientActive, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientActive, true);
[!endif]
[!if IServerGameClients_ClientConnect]
SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientConnect, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientConnect, true);
[!endif]
[!if IServerGameClients_ClientDisconnect]
SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientDisconnect, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientDisconnect, true);
[!endif]
[!if IServerGameClients_ClientCommand]
SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientCommand, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientCommand, true);
[!endif]
[!if IServerGameClients_ClientPutInServer]
SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientPutInServer, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientPutInServer, true);
[!endif]
[!if IServerGameClients_ClientSettingsChanged]
SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientSettingsChanged, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientSettingsChanged, true);
[!endif]
[!if IServerGameClients_ClientSetupVisibility]
SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientSetupVisibility, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientSetupVisibility, true);
[!endif]
[!if IServerGameClients_ClientEarPosition]
SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientEarPosition, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientEarPosition, true);
[!endif]
[!if IServerGameClients_PostClientMessagesSent]
SH_ADD_HOOK_MEMFUNC(IServerGameClients, PostClientMessagesSent, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedPostClientMessagesSent, true);
[!endif]
[!if IServerGameClients_ProcessUsercmds]
SH_ADD_HOOK_MEMFUNC(IServerGameClients, ProcessUsercmds, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedProcessUsercmds, false);
[!endif]
[!if IServerGameClients_GetPlayerLimits]
SH_ADD_HOOK_MEMFUNC(IServerGameClients, GetPlayerLimits, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetPlayerLimits, true);
[!endif]
[!if IServerGameClients_GetPlayerState]
SH_ADD_HOOK_MEMFUNC(IServerGameClients, GetPlayerState, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetPlayerState, true);
[!endif]
[!if IServerGameClients_GetReplayDelay]
SH_ADD_HOOK_MEMFUNC(IServerGameClients, GetReplayDelay, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetReplayDelay, true);
[!endif]
[!if IServerGameClients_GetBugReportInfo]
SH_ADD_HOOK_MEMFUNC(IServerGameClients, GetBugReportInfo, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetBugReportInfo, true);
[!endif]
[!if IServerGameClients_SetCommandClient]
SH_ADD_HOOK_MEMFUNC(IServerGameClients, SetCommandClient, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedSetCommandClient, true);
[!endif]
[!if IServerGameClients_NetworkIDValidated]
#if SOURCE_ENGINE >= SE_ORANGEBOX
SH_ADD_HOOK_MEMFUNC(IServerGameClients, NetworkIDValidated, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedNetworkIDValidated, true);
#endif
[!endif]
}
/////////////////////////////////////////////////////////////////////////
// RemoveHooks
void [!output PLUGIN_CLASS]::RemoveHooks()
{
// Remove the ServerGameDLL hooks
[!if IServerGameDLL_ServerActivate]
SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, ServerActivate, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedServerActivate, true);
[!endif]
[!if IServerGameDLL_GameInit]
SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GameInit, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGameInit, true);
[!endif]
[!if IServerGameDLL_GameFrame]
SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GameFrame, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGameFrame, true);
[!endif]
[!if IServerGameDLL_GameShutdown]
SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GameShutdown, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGameShutdown, true);
[!endif]
[!if IServerGameDLL_LevelInit]
SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, LevelInit, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedLevelInit, true);
[!endif]
[!if IServerGameDLL_LevelShutdown]
SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, LevelShutdown, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedLevelShutdown, true);
[!endif]
[!if IServerGameDLL_GetAllServerClasses]
SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GetAllServerClasses, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGetAllServerClasses, true);
[!endif]
[!if IServerGameDLL_GetTickInterval]
SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GetTickInterval, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGetTickInterval, true);
[!endif]
[!if IServerGameDLL_GetGameDescription]
SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GetGameDescription, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGetGameDescription, true);
[!endif]
// Remove the ServerGameClients hooks
[!if IServerGameClients_ClientActive]
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientActive, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientActive, true);
[!endif]
[!if IServerGameClients_ClientConnect]
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientConnect, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientConnect, true);
[!endif]
[!if IServerGameClients_ClientDisconnect]
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientDisconnect, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientDisconnect, true);
[!endif]
[!if IServerGameClients_ClientCommand]
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientCommand, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientCommand, true);
[!endif]
[!if IServerGameClients_ClientPutInServer]
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientPutInServer, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientPutInServer, true);
[!endif]
[!if IServerGameClients_ClientSettingsChanged]
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientSettingsChanged, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientSettingsChanged, true);
[!endif]
[!if IServerGameClients_ClientSetupVisibility]
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientSetupVisibility, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientSetupVisibility, true);
[!endif]
[!if IServerGameClients_ClientEarPosition]
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientEarPosition, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientEarPosition, true);
[!endif]
[!if IServerGameClients_PostClientMessagesSent]
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, PostClientMessagesSent, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedPostClientMessagesSent, true);
[!endif]
[!if IServerGameClients_ProcessUsercmds]
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ProcessUsercmds, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedProcessUsercmds, true);
[!endif]
[!if IServerGameClients_GetPlayerLimits]
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, GetPlayerLimits, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetPlayerLimits, true);
[!endif]
[!if IServerGameClients_GetPlayerState]
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, GetPlayerState, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetPlayerState, true);
[!endif]
[!if IServerGameClients_GetReplayDelay]
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, GetReplayDelay, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetReplayDelay, true);
[!endif]
[!if IServerGameClients_GetBugReportInfo]
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, GetBugReportInfo, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetBugReportInfo, true);
[!endif]
[!if IServerGameClients_SetCommandClient]
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, SetCommandClient, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedSetCommandClient, true);
[!endif]
[!if IServerGameClients_NetworkIDValidated]
#if SOURCE_ENGINE >= SE_ORANGEBOX
SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, NetworkIDValidated, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedNetworkIDValidated, true);
#endif
[!endif]
}
[!if IServerGameDLL_ServerActivate]
/////////////////////////////////////////////////////////////////////////
// HookedServerActivate
// The server is about to activate
void [!output PLUGIN_CLASS]::HookedServerActivate(edict_t* edict_list, int edict_count, int client_max)
{
// TODO: Implement Method
RETURN_META(MRES_IGNORED);
}
[!endif]
[!if IServerGameDLL_GameInit]
/////////////////////////////////////////////////////////////////////////
// HookedGameInit
// This is called when a new game is started. (restart, map)
bool [!output PLUGIN_CLASS]::HookedGameInit()
{
// TODO: Implement Method
RETURN_META_VALUE(MRES_IGNORED, true);
}
[!endif]
[!if IServerGameDLL_GameFrame]
/////////////////////////////////////////////////////////////////////////
// HookedGameFrame
// The server should run physics / think on all edicts
void [!output PLUGIN_CLASS]::HookedGameFrame(bool simulating)
{
// TODO: Implement Method
RETURN_META(MRES_IGNORED);
}
[!endif]
[!if IServerGameDLL_GameShutdown]
/////////////////////////////////////////////////////////////////////////
// HookedGameShutdown
// This is called when a game ends (server disconnect, death,
// restart, load). NOT on level transitions within a game
void [!output PLUGIN_CLASS]::HookedGameShutdown()
{
// TODO: Implement Method
RETURN_META(MRES_IGNORED);
}
[!endif]
[!if IServerGameDLL_LevelInit]
/////////////////////////////////////////////////////////////////////////
// HookedLevelInit
// Called any time a new level is started (after
// GameInit() also on level transitions within a game)
bool [!output PLUGIN_CLASS]::HookedLevelInit(const char* map_name, char const* map_entities, char const* old_level,
char const* landmark_name, bool load_game, bool bkgnd)
{
// TODO: Implement Method
RETURN_META_VALUE(MRES_IGNORED, true);
}
[!endif]
[!if IServerGameDLL_LevelShutdown]
/////////////////////////////////////////////////////////////////////////
// HookedLevelShutdown
// Called when a level is shutdown (including changing levels)
void [!output PLUGIN_CLASS]::HookedLevelShutdown()
{
// TODO: Implement Method
RETURN_META(MRES_IGNORED);
}
[!endif]
[!if IServerGameDLL_GetAllServerClasses]
/////////////////////////////////////////////////////////////////////////
// HookedGetAllServerClasses
// Gets the list of datatable classes to the engine. The engine
// matches class names from here with edict_t::classname to figure
// out how to encode a class's data for networking
ServerClass* [!output PLUGIN_CLASS]::HookedGetAllServerClasses()
{
// TODO: Implement Method
RETURN_META_VALUE(MRES_IGNORED, NULL);
}
[!endif]
[!if IServerGameDLL_GetTickInterval]
/////////////////////////////////////////////////////////////////////////
// HookedGetTickInterval
// Get the simulation interval (must be compiled with identical values
// into both client and game .dll for MOD!!!). Right now this is only
// requested at server startup time so it can't be changed on the fly, etc.
float [!output PLUGIN_CLASS]::HookedGetTickInterval() const
{
// TODO: Implement Method
RETURN_META_VALUE(MRES_IGNORED, 0.0f);
}
[!endif]
[!if IServerGameDLL_GetGameDescription]
/////////////////////////////////////////////////////////////////////////
// HookedGetGameDescription
// Returns string describing current .dll.
// e.g. TeamFortress 2, Half-Life 2
const char* [!output PLUGIN_CLASS]::HookedGetGameDescription()
{
// TODO: Implement Method
RETURN_META_VALUE(MRES_IGNORED, "");
}
[!endif]
[!if IServerGameClients_ClientActive]
/////////////////////////////////////////////////////////////////////////
// HookedClientActive
// Client is going active. If load_game is true, don't
// spawn the player because its state is already setup.
void [!output PLUGIN_CLASS]::HookedClientActive(edict_t* entity, bool load_game)
{
// TODO: Implement Method
RETURN_META(MRES_IGNORED);
}
[!endif]
[!if IServerGameClients_ClientConnect]
/////////////////////////////////////////////////////////////////////////
// HookedClientConnect
// Client is connecting to server (return false to reject the connection)
// You can specify a rejection message by writing it into reject
bool [!output PLUGIN_CLASS]::HookedClientConnect(edict_t* entity, const char* name, const char* address, char* reject, int reject_len)
{
// TODO: Implement Method
RETURN_META_VALUE(MRES_IGNORED, true);
}
[!endif]
[!if IServerGameClients_ClientDisconnect]
/////////////////////////////////////////////////////////////////////////
// HookedClientDisconnect
// Client is disconnecting from server
void [!output PLUGIN_CLASS]::HookedClientDisconnect(edict_t* entity)
{
// TODO: Implement Method
RETURN_META(MRES_IGNORED);
}
[!endif]
[!if IServerGameClients_ClientCommand]
/////////////////////////////////////////////////////////////////////////
// HookedClientCommand
// The client has typed a command at the console
#if SOURCE_ENGINE >= SE_ORANGEBOX
void [!output PLUGIN_CLASS]::HookedClientCommand(edict_t* entity, const CCommand& args)
#else
void [!output PLUGIN_CLASS]::HookedClientCommand(edict_t* entity)
#endif
{
// Verify the parameters
#if SOURCE_ENGINE == SE_EPISODEONE
CCommand args;
#endif
if(!entity || entity->IsFree())
{
RETURN_META(MRES_IGNORED);
}
// TODO: Implement Method
RETURN_META(MRES_IGNORED);
}
[!endif]
[!if IServerGameClients_ClientPutInServer]
/////////////////////////////////////////////////////////////////////////
// HookedClientPutInServer
// Client is connected and should be put in the game
void [!output PLUGIN_CLASS]::HookedClientPutInServer(edict_t* entity, char const* name)
{
// TODO: Implement Method
RETURN_META(MRES_IGNORED);
}
[!endif]
[!if IServerGameClients_ClientSettingsChanged]
/////////////////////////////////////////////////////////////////////////
// HookedClientSettingsChanged
// A player changed one / several replicated cvars (name etc...)
void [!output PLUGIN_CLASS]::HookedClientSettingsChanged(edict_t* edict)
{
// TODO: Implement Method
RETURN_META(MRES_IGNORED);
}
[!endif]
[!if IServerGameClients_ClientSetupVisibility]
/////////////////////////////////////////////////////////////////////////
// HookedClientSetupVisibility
// Determine PVS origin and set PVS for the player / view entity
void [!output PLUGIN_CLASS]::HookedClientSetupVisibility(edict_t* view_entity, edict_t* client, unsigned char *pvs, int pvs_size)
{
// TODO: Implement Method
RETURN_META(MRES_IGNORED);
}
[!endif]
[!if IServerGameClients_ClientEarPosition]
/////////////////////////////////////////////////////////////////////////
// HookedClientEarPosition
// Get the ear position for a specified client
void [!output PLUGIN_CLASS]::HookedClientEarPosition(edict_t* entity, Vector* ear_origin)
{
// TODO: Implement Method
RETURN_META(MRES_IGNORED);
}
[!endif]
[!if IServerGameClients_PostClientMessagesSent]
/////////////////////////////////////////////////////////////////////////
// HookedPostClientMessagesSent
// Let the game .dll do stuff after messages have been sent
// to all of the clients once the server frame is complete
void [!output PLUGIN_CLASS]::HookedPostClientMessagesSent()
{
// TODO: Implement Method
RETURN_META(MRES_IGNORED);
}
[!endif]
[!if IServerGameClients_ProcessUsercmds]
/////////////////////////////////////////////////////////////////////////
// HookedProcessUsercmds
// A block of CUserCmds has arrived from the user, decode
// them and buffer for execution during player simulation
float [!output PLUGIN_CLASS]::HookedProcessUsercmds(edict_t* player, bf_read* buf, int num_cmds, int total_cmds,
int dropped_packets, bool ignore, bool paused)
{
// TODO: Implement Method
RETURN_META_VALUE(MRES_IGNORED, 0.0f);
}
[!endif]
[!if IServerGameClients_NetworkIDValidated]
/////////////////////////////////////////////////////////////////////////
// HookedNetworkIDValidated
// A user has had their network id setup and validated
void [!output PLUGIN_CLASS]::HookedNetworkIDValidated(const char* user_name, const char* network_id)
{
// TODO: Implement Method
RETURN_META(MRES_IGNORED);
}
[!endif]
[!if IServerGameClients_GetPlayerLimits]
/////////////////////////////////////////////////////////////////////////
// HookedGetPlayerLimits
// Get server max players and lower bound for the same
void [!output PLUGIN_CLASS]::HookedGetPlayerLimits(int& min_players, int& max_players, int& default_max) const
{
// TODO: Implement Method
RETURN_META(MRES_IGNORED);
}
[!endif]
[!if IServerGameClients_GetPlayerState]
/////////////////////////////////////////////////////////////////////////
// HookedGetPlayerState
// For players, looks up the CPlayerState structure corresponding to the player
CPlayerState* [!output PLUGIN_CLASS]::HookedGetPlayerState(edict_t* player)
{
// TODO: Implement Method
RETURN_META_VALUE(MRES_IGNORED, NULL);
}
[!endif]
[!if IServerGameClients_GetReplayDelay]
/////////////////////////////////////////////////////////////////////////
// HookedGetReplayDelay
// Returns number of delay ticks if player is in Replay mode (0 = no delay)
int [!output PLUGIN_CLASS]::HookedGetReplayDelay(edict_t* player, int& entity)
{
// TODO: Implement Method
RETURN_META_VALUE(MRES_IGNORED, 0);
}
[!endif]
[!if IServerGameClients_GetBugReportInfo]
/////////////////////////////////////////////////////////////////////////
// HookedGetBugReportInfo
// Anything this game .dll wants to add to the bug reporter text
//(e.g., the entity/model under the picker crosshair) can be added here
void [!output PLUGIN_CLASS]::HookedGetBugReportInfo(char* buf, int size)
{
// TODO: Implement Method
RETURN_META(MRES_IGNORED);
}
[!endif]
[!if IServerGameClients_SetCommandClient]
/////////////////////////////////////////////////////////////////////////
// HookedSetCommandClient
// Sets the client index for the client who typed the command into his / her console
void [!output PLUGIN_CLASS]::HookedSetCommandClient(int index)
{
// TODO: Implement Method
RETURN_META(MRES_IGNORED);
}
[!endif]

View File

@ -0,0 +1,278 @@
///////////////////////////////////////////////////////////////////////////////
//
// File: [!output PLUGIN_CLASS]Hooks.h
// Author: [!output PLUGIN_AUTHOR]
// Date: [!output CURRENT_DATE]
//
// License: [!output PLUGIN_LICENSE]
//
// This software is provided 'as-is', without any express or
// implied warranty. In no event will the authors be held liable
// for any damages arising from the use of this software.
//
// Based on code written by AlliedModders LLC. Sample Plugin
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _PLUGIN_HOOKS_H
#define _PLUGIN_HOOKS_H
[!if IServerGameDLL_ServerActivate]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_SERVER_ACTIVATE
#define DECL_HOOK_SERVER_ACTIVATE \
\
void HookedServerActivate(edict_t* edict_list, \
int edict_count, \
int client_max)
[!endif]
[!if IServerGameDLL_GameInit]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_GAME_INIT
#define DECL_HOOK_GAME_INIT \
\
bool HookedGameInit()
[!endif]
[!if IServerGameDLL_GameFrame]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_GAME_FRAME
#define DECL_HOOK_GAME_FRAME \
\
void HookedGameFrame(bool simulating)
[!endif]
[!if IServerGameDLL_GameShutdown]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_GAME_SHUTDOWN
#define DECL_HOOK_GAME_SHUTDOWN \
\
void HookedGameShutdown()
[!endif]
[!if IServerGameDLL_LevelInit]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_LEVEL_INIT
#define DECL_HOOK_LEVEL_INIT \
\
bool HookedLevelInit(const char* map_name, \
char const* map_entities, \
char const* old_level, \
char const* landmark_name, \
bool load_game, bool bkgnd)
[!endif]
[!if IServerGameDLL_LevelShutdown]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_LEVEL_SHUTDOWN
#define DECL_HOOK_LEVEL_SHUTDOWN \
\
void HookedLevelShutdown();
[!endif]
[!if IServerGameDLL_GetAllServerClasses]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_GET_ALL_SERVER_CLASSES
#define DECL_HOOK_GET_ALL_SERVER_CLASSES \
\
ServerClass* HookedGetAllServerClasses()
[!endif]
[!if IServerGameDLL_GetTickInterval]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_GET_TICK_INTERVAL
#define DECL_HOOK_GET_TICK_INTERVAL \
\
float HookedGetTickInterval() const
[!endif]
[!if IServerGameDLL_GetGameDescription]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_GET_GAME_DESC
#define DECL_HOOK_GET_GAME_DESC \
\
const char* HookedGetGameDescription()
[!endif]
[!if IServerGameClients_ClientActive]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_CLIENT_ACTIVE
#define DECL_HOOK_CLIENT_ACTIVE \
\
void HookedClientActive(edict_t* entity, \
bool load_game)
[!endif]
[!if IServerGameClients_ClientConnect]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_CLIENT_CONNECT
#define DECL_HOOK_CLIENT_CONNECT \
\
bool HookedClientConnect(edict_t* entity, \
const char* name, \
const char* address, \
char* reject, \
int reject_len)
[!endif]
[!if IServerGameClients_ClientDisconnect]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_CLIENT_DISCONNECT
#define DECL_HOOK_CLIENT_DISCONNECT \
\
void HookedClientDisconnect(edict_t* entity)
[!endif]
[!if IServerGameClients_ClientCommand]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_CLIENT_COMMAND
#if SOURCE_ENGINE >= SE_ORANGEBOX
#define DECL_HOOK_CLIENT_COMMAND \
\
void HookedClientCommand(edict_t* entity, \
const CCommand& args)
#else
#define DECL_HOOK_CLIENT_COMMAND \
\
void HookedClientCommand(edict_t* entity)
#endif
[!endif]
[!if IServerGameClients_ClientPutInServer]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_CLIENT_PUT_IN_SERVER
#define DECL_HOOK_CLIENT_PUT_IN_SERVER \
\
void HookedClientPutInServer(edict_t* entity, \
char const* name)
[!endif]
[!if IServerGameClients_ClientSettingsChanged]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_CLIENT_SETTINGS_CHANGED
#define DECL_HOOK_CLIENT_SETTINGS_CHANGED \
\
void HookedClientSettingsChanged(edict_t* edict)
[!endif]
[!if IServerGameClients_ClientSetupVisibility]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_CLIENT_SETUP_VISIBILITY
#define DECL_HOOK_CLIENT_SETUP_VISIBILITY \
\
void HookedClientSetupVisibility(edict_t* view_entity, \
edict_t* client, \
unsigned char *pvs, \
int pvs_size)
[!endif]
[!if IServerGameClients_ClientEarPosition]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_CLIENT_EAR_POSITION
#define DECL_HOOK_CLIENT_EAR_POSITION \
\
void HookedClientEarPosition(edict_t* entity, \
Vector* ear_origin)
[!endif]
[!if IServerGameClients_PostClientMessagesSent]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_POST_CLIENT_MESSAGES_SENT
#define DECL_HOOK_POST_CLIENT_MESSAGES_SENT \
\
void HookedPostClientMessagesSent()
[!endif]
[!if IServerGameClients_ProcessUsercmds]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_PROCESS_USER_CMDS
#define DECL_HOOK_PROCESS_USER_CMDS \
\
float HookedProcessUsercmds(edict_t* player, \
bf_read* buf, \
int num_cmds, \
int total_cmds, \
int dropped_packets, \
bool ignore, \
bool paused)
[!endif]
[!if IServerGameClients_NetworkIDValidated]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_NETWORK_ID_VALIDATED
#define DECL_HOOK_NETWORK_ID_VALIDATED \
\
void HookedNetworkIDValidated(const char* user_name, \
const char* network_id)
[!endif]
[!if IServerGameClients_GetPlayerLimits]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_GET_PLAYER_LIMITS
#define DECL_HOOK_GET_PLAYER_LIMITS \
\
void HookedGetPlayerLimits(int& min_players, \
int& max_players, \
int& default_max) const
[!endif]
[!if IServerGameClients_GetPlayerState]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_GET_PLAYER_STATE
#define DECL_HOOK_GET_PLAYER_STATE \
\
CPlayerState* HookedGetPlayerState(edict_t* player)
[!endif]
[!if IServerGameClients_GetReplayDelay]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_GET_REPLAY_DELAY
#define DECL_HOOK_GET_REPLAY_DELAY \
\
int HookedGetReplayDelay(edict_t* player, \
int& entity)
[!endif]
[!if IServerGameClients_GetBugReportInfo]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_GET_BUG_REPORT_INFO
#define DECL_HOOK_GET_BUG_REPORT_INFO \
\
void HookedGetBugReportInfo(char* buf, int size)
[!endif]
[!if IServerGameClients_SetCommandClient]
/////////////////////////////////////////////////////////////////////////
// Define DECL_HOOK_SET_COMMAND_CLIENT
#define DECL_HOOK_SET_COMMAND_CLIENT \
\
void HookedSetCommandClient(int index)
[!endif]
#endif // _PLUGIN_HOOKS_H

View File

@ -0,0 +1,215 @@
///////////////////////////////////////////////////////////////////////////////
//
// File: [!output PLUGIN_CLASS].cpp
// Author: [!output PLUGIN_AUTHOR]
// Date: [!output CURRENT_DATE]
//
// License: [!output PLUGIN_LICENSE]
//
// This software is provided 'as-is', without any express or
// implied warranty. In no event will the authors be held liable
// for any damages arising from the use of this software.
//
// Based on code written by AlliedModders LLC. Sample Plugin
//
///////////////////////////////////////////////////////////////////////////////
#include "StdMMS.h"
/////////////////////////////////////////////////////////////////////////
// Global Variables
IServerGameDLL* [!output PLUGIN_CLASS]::GameServer(NULL);
IServerGameClients* [!output PLUGIN_CLASS]::GameClients(NULL);
IVEngineServer* [!output PLUGIN_CLASS]::EngineServer(NULL);
IServerPluginHelpers* [!output PLUGIN_CLASS]::PluginHelpers(NULL);
IGameEventManager2* [!output PLUGIN_CLASS]::GameEvents(NULL);
IServerPluginCallbacks* [!output PLUGIN_CLASS]::VspCallbacks(NULL);
IPlayerInfoManager* [!output PLUGIN_CLASS]::PlayerInfoManager(NULL);
ICvar* [!output PLUGIN_CLASS]::CVar(NULL);
CGlobalVars* [!output PLUGIN_CLASS]::GlobalVars(NULL);
/////////////////////////////////////////////////////////////////////////
// Class BaseAccessor
// This is needed to register cvars / CON_COMMANDs
class BaseAccessor : public IConCommandBaseAccessor
{
public:
bool RegisterConCommandBase(ConCommandBase *pCommandBase)
{
// Always call META_REGCVAR instead
// of going through the [!output PLUGIN_CLASS]::EngineServer
return META_REGCVAR(pCommandBase);
}
}
s_BaseAccessor;
///////////////////////////////////////////////////////////////////////////////
// Expose the Plugin
[!output PLUGIN_CLASS] [!output PLUGIN_CLASS]::Global;
PLUGIN_EXPOSE([!output PLUGIN_CLASS], [!output PLUGIN_CLASS]::Global);
/////////////////////////////////////////////////////////////////////////
// Load
bool [!output PLUGIN_CLASS]::Load(PluginId id, ISmmAPI* ismm, char* error, size_t maxlen, bool late)
{
PLUGIN_SAVEVARS();
// Get the current Enginefactory interfaces
GET_V_IFACE_CURRENT(GetEngineFactory, [!output PLUGIN_CLASS]::EngineServer, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
GET_V_IFACE_CURRENT(GetEngineFactory, [!output PLUGIN_CLASS]::GameEvents, IGameEventManager2, INTERFACEVERSION_GAMEEVENTSMANAGER2);
GET_V_IFACE_CURRENT(GetEngineFactory, [!output PLUGIN_CLASS]::PluginHelpers, IServerPluginHelpers, INTERFACEVERSION_ISERVERPLUGINHELPERS);
GET_V_IFACE_CURRENT(GetEngineFactory, [!output PLUGIN_CLASS]::CVar, ICvar, CVAR_INTERFACE_VERSION);
// Get the current ServerFactory interfaces
GET_V_IFACE_ANY(GetServerFactory, [!output PLUGIN_CLASS]::GameServer, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
GET_V_IFACE_ANY(GetServerFactory, [!output PLUGIN_CLASS]::GameClients, IServerGameClients, INTERFACEVERSION_SERVERGAMECLIENTS);
GET_V_IFACE_ANY(GetServerFactory, [!output PLUGIN_CLASS]::PlayerInfoManager, IPlayerInfoManager, INTERFACEVERSION_PLAYERINFOMANAGER);
// Get the current Globals interfaces
[!output PLUGIN_CLASS]::GlobalVars = ismm->GetCGlobals();
// Load the VSP listener. This is usually needed for IServerPluginHelpers
#if defined METAMOD_PLAPI_VERSION
if (([!output PLUGIN_CLASS]::VspCallbacks = ismm->GetVSPInfo(NULL)) == NULL)
#endif
{
ismm->AddListener(this, this);
ismm->EnableVSPListener();
}
// Add the hooks
AddHooks();
// Get the engine server interface
#if SOURCE_ENGINE == SE_EPISODEONE
m_engine_server = SH_GET_CALLCLASS([!output PLUGIN_CLASS]::EngineServer);
#endif
ENGINE_CALL(&IVEngineServer::LogPrint)("All hooks started!\n");
// Register the base accessor
#if SOURCE_ENGINE >= SE_ORANGEBOX
g_pCVar = [!output PLUGIN_CLASS]::CVar;
ConVar_Register(0, &s_BaseAccessor);
#else
ConCommandBaseMgr::OneTimeInit(&s_BaseAccessor);
#endif
return true;
}
/////////////////////////////////////////////////////////////////////////
// Unload
bool [!output PLUGIN_CLASS]::Unload(char *error, size_t maxlen)
{
// Remove the hooks
RemoveHooks();
// Release the engine server interface
#if SOURCE_ENGINE == SE_EPISODEONE
SH_RELEASE_CALLCLASS(m_engine_server);
#endif
return true;
}
/////////////////////////////////////////////////////////////////////////
// OnVSPListening
void [!output PLUGIN_CLASS]::OnVSPListening(IServerPluginCallbacks* vsp_callbacks)
{
[!output PLUGIN_CLASS]::VspCallbacks = vsp_callbacks;
}
/////////////////////////////////////////////////////////////////////////
// GetVersion
const char* [!output PLUGIN_CLASS]::GetVersion()
{
return "1.0.0.0";
}
/////////////////////////////////////////////////////////////////////////
// GetDate
const char* [!output PLUGIN_CLASS]::GetDate()
{
return __DATE__;
}
/////////////////////////////////////////////////////////////////////////
// GetLogTag
const char* [!output PLUGIN_CLASS]::GetLogTag()
{
return "[!output PLUGIN_NAME]Log";
}
/////////////////////////////////////////////////////////////////////////
// GetLicense
const char* [!output PLUGIN_CLASS]::GetLicense()
{
return "[!output PLUGIN_LICENSE]";
}
/////////////////////////////////////////////////////////////////////////
// GetAuthor
const char* [!output PLUGIN_CLASS]::GetAuthor()
{
return "[!output PLUGIN_AUTHOR]";
}
/////////////////////////////////////////////////////////////////////////
// GetDescription
const char* [!output PLUGIN_CLASS]::GetDescription()
{
return "[!output PLUGIN_DESC]";
}
/////////////////////////////////////////////////////////////////////////
// GetName
const char* [!output PLUGIN_CLASS]::GetName()
{
return "[!output PLUGIN_NAME]";
}
/////////////////////////////////////////////////////////////////////////
// GetURL
const char* [!output PLUGIN_CLASS]::GetURL()
{
return "[!output PLUGIN_URL]";
}

View File

@ -0,0 +1,173 @@
///////////////////////////////////////////////////////////////////////////////
//
// File: [!output PLUGIN_CLASS].h
// Author: [!output PLUGIN_AUTHOR]
// Date: [!output CURRENT_DATE]
//
// License: [!output PLUGIN_LICENSE]
//
// This software is provided 'as-is', without any express or
// implied warranty. In no event will the authors be held liable
// for any damages arising from the use of this software.
//
// Based on code written by AlliedModders LLC. Sample Plugin
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _PLUGIN_H
#define _PLUGIN_H
/////////////////////////////////////////////////////////////////////////
class CCommand;
/////////////////////////////////////////////////////////////////////////
// Class [!output PLUGIN_CLASS]
class [!output PLUGIN_CLASS] : public ISmmPlugin, public IMetamodListener
{
////////////////////////////////////////
// Plugin Interface
public:
virtual bool Load(PluginId id,
ISmmAPI* ismm,
char* error,
size_t maxlen,
bool late);
virtual bool Unload(char* error, size_t maxlen);
virtual void OnVSPListening(IServerPluginCallbacks* vsp_callbacks);
////////////////////////////////////////
// Plugin Info
public:
virtual const char* GetAuthor();
virtual const char* GetName();
virtual const char* GetDescription();
virtual const char* GetURL();
virtual const char* GetLicense();
virtual const char* GetVersion();
virtual const char* GetDate();
virtual const char* GetLogTag();
////////////////////////////////////////
// Plugin Globals
public:
static IServerGameDLL* GameServer;
static IServerGameClients* GameClients;
static IVEngineServer* EngineServer;
static IServerPluginHelpers* PluginHelpers;
static IGameEventManager2* GameEvents;
static IServerPluginCallbacks* VspCallbacks;
static IPlayerInfoManager* PlayerInfoManager;
static ICvar* CVar;
static CGlobalVars* GlobalVars;
static [!output PLUGIN_CLASS] Global;
////////////////////////////////////////
// Hooks
private:
void AddHooks();
void RemoveHooks();
[!if IServerGameDLL_ServerActivate]
DECL_HOOK_SERVER_ACTIVATE;
[!endif]
[!if IServerGameDLL_GameInit]
DECL_HOOK_GAME_INIT;
[!endif]
[!if IServerGameDLL_GameFrame]
DECL_HOOK_GAME_FRAME;
[!endif]
[!if IServerGameDLL_GameShutdown]
DECL_HOOK_GAME_SHUTDOWN;
[!endif]
[!if IServerGameDLL_LevelInit]
DECL_HOOK_LEVEL_INIT;
[!endif]
[!if IServerGameDLL_LevelShutdown]
DECL_HOOK_LEVEL_SHUTDOWN;
[!endif]
[!if IServerGameDLL_GetAllServerClasses]
DECL_HOOK_GET_ALL_SERVER_CLASSES;
[!endif]
[!if IServerGameDLL_GetTickInterval]
DECL_HOOK_GET_TICK_INTERVAL;
[!endif]
[!if IServerGameDLL_GetGameDescription]
DECL_HOOK_GET_GAME_DESC;
[!endif]
[!if IServerGameClients_ClientActive]
DECL_HOOK_CLIENT_ACTIVE;
[!endif]
[!if IServerGameClients_ClientConnect]
DECL_HOOK_CLIENT_CONNECT;
[!endif]
[!if IServerGameClients_ClientDisconnect]
DECL_HOOK_CLIENT_DISCONNECT;
[!endif]
[!if IServerGameClients_ClientCommand]
DECL_HOOK_CLIENT_COMMAND;
[!endif]
[!if IServerGameClients_ClientPutInServer]
DECL_HOOK_CLIENT_PUT_IN_SERVER;
[!endif]
[!if IServerGameClients_ClientSettingsChanged]
DECL_HOOK_CLIENT_SETTINGS_CHANGED;
[!endif]
[!if IServerGameClients_ClientSetupVisibility]
DECL_HOOK_CLIENT_SETUP_VISIBILITY;
[!endif]
[!if IServerGameClients_ClientEarPosition]
DECL_HOOK_CLIENT_EAR_POSITION;
[!endif]
[!if IServerGameClients_PostClientMessagesSent]
DECL_HOOK_POST_CLIENT_MESSAGES_SENT;
[!endif]
[!if IServerGameClients_ProcessUsercmds]
DECL_HOOK_PROCESS_USER_CMDS;
[!endif]
[!if IServerGameClients_NetworkIDValidated]
DECL_HOOK_NETWORK_ID_VALIDATED;
[!endif]
[!if IServerGameClients_GetPlayerLimits]
DECL_HOOK_GET_PLAYER_LIMITS;
[!endif]
[!if IServerGameClients_GetPlayerState]
DECL_HOOK_GET_PLAYER_STATE;
[!endif]
[!if IServerGameClients_GetReplayDelay]
DECL_HOOK_GET_REPLAY_DELAY;
[!endif]
[!if IServerGameClients_GetBugReportInfo]
DECL_HOOK_GET_BUG_REPORT_INFO;
[!endif]
[!if IServerGameClients_SetCommandClient]
DECL_HOOK_SET_COMMAND_CLIENT;
[!endif]
////////////////////////////////////////
// Plugin Variables
protected:
#if SOURCE_ENGINE == SE_EPISODEONE
SourceHook::CallClass<IVEngineServer>* m_engine_server;
#endif
};
/////////////////////////////////////////////////////////////////////////
// Global Vars
PLUGIN_GLOBALVARS();
#endif // _PLUGIN_H