Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit f3d3a64

Browse files
authored
Merge pull request #13 from 404UNFca/master
Update plugin templates
2 parents 6375546 + ba048b4 commit f3d3a64

17 files changed

+340
-179
lines changed

Resources/Misc/Templates/CSSCSGOTemplate.sp

-33
This file was deleted.

Resources/Misc/Templates/EmptyScriptTemplate.sp

Whitespace-only changes.

Resources/Misc/Templates/OldSyntaxCSSCSGOTemplate.sp

-31
This file was deleted.

Resources/Misc/Templates/OldSyntaxScriptTemplate.sp

-23
This file was deleted.

Resources/Misc/Templates/OldSyntaxTFTemplate.sp

-26
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#include <sourcemod>
2+
#include <cstrike>
3+
4+
#pragma semicolon 1
5+
6+
#define PLUGIN_VERSION "0.00"
7+
8+
public Plugin:myinfo =
9+
{
10+
name = "Name of plugin here!",
11+
author = "Your name here!",
12+
description = "Brief description of plugin functionality here!",
13+
version = PLUGIN_VERSION,
14+
url = "Your website URL/AlliedModders profile URL"
15+
};
16+
17+
public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
18+
{
19+
// No need for the old GetGameFolderName setup.
20+
EngineVersion:g_engineversion = GetEngineVersion();
21+
if (g_engineversion != Engine_CSGO)
22+
{
23+
SetFailState("This plugin was made for use with Counter-Strike: Global Offensive only.");
24+
}
25+
}
26+
27+
public OnPluginStart()
28+
{
29+
/**
30+
* @note For the love of god, please stop using FCVAR_PLUGIN.
31+
* Console.inc even explains this above the entry for the FCVAR_PLUGIN define.
32+
* "No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk."
33+
*/
34+
CreateConVar("sm_pluginnamehere_version", PLUGIN_VERSION, "Standard plugin version ConVar. Please don't change me!", FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
35+
}
36+
37+
public OnMapStart()
38+
{
39+
/**
40+
* @note Precache your models, sounds, etc. here!
41+
* Not in OnConfigsExecuted! Doing so leads to issues.
42+
*/
43+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#include <sourcemod>
2+
#include <cstrike>
3+
4+
#pragma semicolon 1
5+
6+
#define PLUGIN_VERSION "0.00"
7+
8+
public Plugin:myinfo =
9+
{
10+
name = "Name of plugin here!",
11+
author = "Your name here!",
12+
description = "Brief description of plugin functionality here!",
13+
version = PLUGIN_VERSION,
14+
url = "Your website URL/AlliedModders profile URL"
15+
};
16+
17+
public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
18+
{
19+
// No need for the old GetGameFolderName setup.
20+
EngineVersion:g_engineversion = GetEngineVersion();
21+
if (g_engineversion != Engine_CSS)
22+
{
23+
SetFailState("This plugin was made for use with Counter-Strike: Source only.");
24+
}
25+
}
26+
27+
public OnPluginStart()
28+
{
29+
/**
30+
* @note For the love of god, please stop using FCVAR_PLUGIN.
31+
* Console.inc even explains this above the entry for the FCVAR_PLUGIN define.
32+
* "No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk."
33+
*/
34+
CreateConVar("sm_pluginnamehere_version", PLUGIN_VERSION, "Standard plugin version ConVar. Please don't change me!", FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
35+
}
36+
37+
public OnMapStart()
38+
{
39+
/**
40+
* @note Precache your models, sounds, etc. here!
41+
* Not in OnConfigsExecuted! Doing so leads to issues.
42+
*/
43+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#include <sourcemod>
2+
#include <sdktools>
3+
4+
#pragma semicolon 1
5+
6+
#define PLUGIN_VERSION "0.00"
7+
8+
public Plugin:myinfo =
9+
{
10+
name = "Name of plugin here!",
11+
author = "Your name here!",
12+
description = "Brief description of plugin functionality here!",
13+
version = PLUGIN_VERSION,
14+
url = "Your website URL/AlliedModders profile URL"
15+
};
16+
17+
public OnPluginStart()
18+
{
19+
/**
20+
* @note For the love of god, please stop using FCVAR_PLUGIN.
21+
* Console.inc even explains this above the entry for the FCVAR_PLUGIN define.
22+
* "No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk."
23+
*/
24+
CreateConVar("sm_pluginnamehere_version", PLUGIN_VERSION, "Standard plugin version ConVar. Please don't change me!", FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
25+
}
26+
27+
public OnMapStart()
28+
{
29+
/**
30+
* @note Precache your models, sounds, etc. here!
31+
* Not in OnConfigsExecuted! Doing so leads to issues.
32+
*/
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#include <sourcemod>
2+
#include <tf2_stocks>
3+
// ^ tf2_stocks.inc itself includes sdktools.inc and tf2.inc
4+
5+
#pragma semicolon 1
6+
7+
#define PLUGIN_VERSION "0.00"
8+
9+
EngineVersion:g_engineversion;
10+
11+
public Plugin:myinfo =
12+
{
13+
name = "Name of plugin here!",
14+
author = "Your name here!",
15+
description = "Brief description of plugin functionality here!",
16+
version = PLUGIN_VERSION,
17+
url = "Your website URL/AlliedModders profile URL"
18+
};
19+
20+
public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
21+
{
22+
// No need for the old GetGameFolderName setup.
23+
EngineVersion:g_engineversion = GetEngineVersion();
24+
if (g_engineversion != Engine_TF2)
25+
{
26+
SetFailState("This plugin was made for use with Team Fortress 2 only.");
27+
}
28+
}
29+
30+
public OnPluginStart()
31+
{
32+
/**
33+
* @note For the love of god, please stop using FCVAR_PLUGIN.
34+
* Console.inc even explains this above the entry for the FCVAR_PLUGIN define.
35+
* "No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk."
36+
*/
37+
CreateConVar("sm_pluginnamehere_version", PLUGIN_VERSION, "Standard plugin version ConVar. Please don't change me!", FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
38+
}
39+
40+
public OnMapStart()
41+
{
42+
/**
43+
* @note Precache your models, sounds, etc. here!
44+
* Not in OnConfigsExecuted! Doing so leads to issues.
45+
*/
46+
}

Resources/Misc/Templates/ScriptTemplate.sp

-25
This file was deleted.

Resources/Misc/Templates/SimpleScriptTemplate.sp

-7
This file was deleted.

Resources/Misc/Templates/TFTemplate.sp

-26
This file was deleted.
+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#include <sourcemod>
2+
#include <cstrike>
3+
4+
#pragma semicolon 1
5+
#pragma newdecls required
6+
7+
#define PLUGIN_VERSION "0.00"
8+
9+
public Plugin myinfo =
10+
{
11+
name = "Name of plugin here!",
12+
author = "Your name here!",
13+
description = "Brief description of plugin functionality here!",
14+
version = PLUGIN_VERSION,
15+
url = "Your website URL/AlliedModders profile URL"
16+
};
17+
18+
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)
19+
{
20+
// No need for the old GetGameFolderName setup.
21+
EngineVersion g_engineversion = GetEngineVersion();
22+
if (g_engineversion != Engine_CSGO)
23+
{
24+
SetFailState("This plugin was made for use with Counter-Strike: Global Offensive only.");
25+
}
26+
}
27+
28+
public void OnPluginStart()
29+
{
30+
/**
31+
* @note For the love of god, please stop using FCVAR_PLUGIN.
32+
* Console.inc even explains this above the entry for the FCVAR_PLUGIN define.
33+
* "No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk."
34+
*/
35+
CreateConVar("sm_pluginnamehere_version", PLUGIN_VERSION, "Standard plugin version ConVar. Please don't change me!", FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
36+
}
37+
38+
public void OnMapStart()
39+
{
40+
/**
41+
* @note Precache your models, sounds, etc. here!
42+
* Not in OnConfigsExecuted! Doing so leads to issues.
43+
*/
44+
}

0 commit comments

Comments
 (0)