-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing dir structure for easier tagging of versions
- Loading branch information
antithasys
committed
Oct 1, 2009
1 parent
8beb23f
commit 60b4700
Showing
24 changed files
with
10,632 additions
and
0 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
Simple Team Manager/addons/sourcemod/configs/simple-alltalkmanager_events.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
"game_events" | ||
{ | ||
"teamplay_round_start" | ||
{ | ||
"reason" "Round Start" | ||
"setting" "1" | ||
} | ||
"teamplay_setup_finished" | ||
{ | ||
"reason" "Setup Period Ended" | ||
"setting" "0" | ||
} | ||
"teamplay_overtime_begin" | ||
{ | ||
"reason" "Overtime Began" | ||
"setting" "1" | ||
} | ||
"teamplay_overtime_end" | ||
{ | ||
"reason" "Overtime Ended" | ||
"setting" "1" | ||
} | ||
"teamplay_round_win" | ||
{ | ||
"reason" "Round Ended" | ||
"setting" "1" | ||
} | ||
"teamplay_suddendeath_begin" | ||
{ | ||
"reason" "Sudden Death Began" | ||
"setting" "1" | ||
} | ||
"teamplay_suddendeath_end" | ||
{ | ||
"reason" "Sudden Death Ended" | ||
"setting" "1" | ||
} | ||
"teamplay_round_stalemate" | ||
{ | ||
"reason" "Stalemate" | ||
"setting" "1" | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
Simple Team Manager/addons/sourcemod/configs/simple-chatcolors.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"admin_colors" | ||
{ | ||
"groupname2" | ||
{ | ||
"flag" "z" | ||
"namecolor" "{green}" | ||
"textcolor" "{olive}" | ||
} | ||
"groupname1" | ||
{ | ||
"flag" "a" | ||
"namecolor" "{teamcolor}" | ||
"textcolor" "{green}" | ||
} | ||
} |
Binary file added
BIN
+6.86 KB
Simple Team Manager/addons/sourcemod/plugins/simple-alltalkmanager.smx
Binary file not shown.
Binary file added
BIN
+16.2 KB
Simple Team Manager/addons/sourcemod/plugins/simple-donatorbenefits.smx
Binary file not shown.
Binary file added
BIN
+4.73 KB
Simple Team Manager/addons/sourcemod/plugins/simple-messagesuppression.smx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
337 changes: 337 additions & 0 deletions
337
Simple Team Manager/addons/sourcemod/scripting/include/simple-plugins.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,337 @@ | ||
/************************************************************************ | ||
************************************************************************* | ||
Simple Plugins | ||
Description: | ||
Included file for core plugin in the Simple Plugins project | ||
************************************************************************* | ||
************************************************************************* | ||
This file is part of Simple Plugins project. | ||
This plugin is free software: you can redistribute | ||
it and/or modify it under the terms of the GNU General Public License as | ||
published by the Free Software Foundation, either version 3 of the License, or | ||
later version. | ||
This plugin is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this plugin. If not, see <http://www.gnu.org/licenses/>. | ||
************************************************************************* | ||
************************************************************************* | ||
File Information | ||
$Id$ | ||
$Author$ | ||
$Revision$ | ||
$Date$ | ||
$LastChangedBy$ | ||
$LastChangedDate$ | ||
$URL$ | ||
$Copyright: (c) Simple Plugins 2008-2009$ | ||
************************************************************************* | ||
*************************************************************************/ | ||
|
||
#if defined _simpleplugin_included | ||
#endinput | ||
#endif | ||
|
||
#define _simpleplugin_included | ||
|
||
#define CORE_INC_VERSION "1.1.$Rev$" | ||
|
||
#pragma semicolon 1 | ||
#include <sourcemod> | ||
#undef REQUIRE_PLUGIN | ||
#include <adminmenu> | ||
#define REQUIRE_PLUGIN | ||
#undef REQUIRE_EXTENSIONS | ||
#undef AUTOLOAD_EXTENSIONS | ||
#tryinclude <cstrike> | ||
#tryinclude <tf2> | ||
#tryinclude <tf2_stocks> | ||
#define AUTOLOAD_EXTENSIONS | ||
#define REQUIRE_EXTENSIONS | ||
|
||
enum e_SupportedMods | ||
{ | ||
GameType_Unknown, | ||
GameType_AOC, | ||
GameType_CSS, | ||
GameType_DOD, | ||
GameType_FF, | ||
GameType_HIDDEN, | ||
GameType_HL2DM, | ||
GameType_INS, | ||
GameType_L4D, | ||
GameType_NEO, | ||
GameType_SGTLS, | ||
GameType_TF, | ||
GameType_ZPS | ||
}; | ||
|
||
enum e_Teams | ||
{ | ||
Unknown, | ||
Spectator, | ||
Team1, | ||
Team2 | ||
}; | ||
|
||
new g_aCurrentTeams[e_Teams]; | ||
new e_SupportedMods:g_CurrentMod; | ||
new String:g_sGameName[e_SupportedMods][32] = { "Unknown", | ||
"Age of Chivalry", | ||
"Counter Strike", | ||
"Day Of Defeat", | ||
"Fortress Forever", | ||
"Hidden: Source", | ||
"Half Life 2: Deathmatch", | ||
"Insurgency", | ||
"Left 4 Dead", | ||
"Neotokyo", | ||
"Stargate TLS", | ||
"Team Fortress 2", | ||
"Zombie Panic: Source" | ||
}; | ||
|
||
public SharedPlugin:_pl_simpleplugin = | ||
{ | ||
name = "simple-plugins", | ||
file = "simple-plugins.smx", | ||
#if defined REQUIRE_PLUGIN | ||
required = 1 | ||
#else | ||
required = 0 | ||
#endif | ||
}; | ||
|
||
#if !defined REQUIRE_PLUGIN | ||
public _pl_simpleplugin_SetNTVOptional() | ||
{ | ||
MarkNativeAsOptional("SM_MovePlayer"); | ||
MarkNativeAsOptional("SM_SetForcedTeam"); | ||
MarkNativeAsOptional("SM_GetForcedTeam"); | ||
MarkNativeAsOptional("SM_ClearForcedTeam"); | ||
MarkNativeAsOptional("SM_GetForcedPlayer"); | ||
MarkNativeAsOptional("SM_AssignBuddy"); | ||
MarkNativeAsOptional("SM_SearchBuddy"); | ||
MarkNativeAsOptional("SM_LockBuddy"); | ||
MarkNativeAsOptional("SM_IsBuddyLocked"); | ||
MarkNativeAsOptional("SM_ClearBuddy"); | ||
MarkNativeAsOptional("SM_IsValidAdmin"); | ||
MarkNativeAsOptional("SM_IsValidTeam"); | ||
} | ||
#endif | ||
|
||
/********************************************************************** | ||
* When a player has to moved | ||
* | ||
* @param plugin Plugin that initiated the move | ||
* @param client The client index of the player that was moved | ||
* @param team The team index the player was moved to | ||
* @noreturn | ||
**********************************************************************/ | ||
forward SM_OnPlayerMoved(Handle:plugin, client, team); | ||
|
||
/********************************************************************** | ||
* Move a player to the supplied team | ||
* | ||
* @param client The client index of the player to be moved | ||
* @param team The team to move the player to | ||
* @noreturn | ||
* @error Invalid client or team index | ||
**********************************************************************/ | ||
native SM_MovePlayer(client, team); | ||
|
||
/********************************************************************** | ||
* Move a player to the supplied team | ||
* | ||
* @param client The client index of the player to set | ||
* @param team The team to move the to set | ||
* @param override Whether or not to override another plugin | ||
* @return True if successful, false if not | ||
* @error Invalid client or team index | ||
**********************************************************************/ | ||
native SM_SetForcedTeam(client, team, bool:override = false); | ||
|
||
/********************************************************************** | ||
* Gets the client's forced team index | ||
* | ||
* @param client The client index of the player to check | ||
* @param plugin Optional: The plugin handle of the plugin | ||
that set the team | ||
* @return The team index of the forced team | ||
Zero if no forced team | ||
* @error Invalid client index | ||
**********************************************************************/ | ||
native SM_GetForcedTeam(client, &Handle:plugin = INVALID_HANDLE); | ||
|
||
/********************************************************************** | ||
* Clears a client's forced team | ||
* | ||
* @param client The client index of the player to check | ||
* @return True if successful, false if not | ||
* @error Invalid client index | ||
**********************************************************************/ | ||
native SM_ClearForcedTeam(client); | ||
|
||
/********************************************************************** | ||
* Gets a forced player on the wrong that is currently on the wrong team | ||
* This will only return a player if the calling plugin assigned the team | ||
* | ||
* @param team The team index the player should be on | ||
* @return The client index of the player | ||
Zero if no player found | ||
* @error Invalid client index | ||
**********************************************************************/ | ||
native SM_GetForcedPlayer(team); | ||
|
||
/********************************************************************** | ||
* Assign a players buddy | ||
* | ||
* @param client The client index of the player to assign | ||
* @param player The player index of the player to assign | ||
* @param override Whether or not to override a player lock | ||
* @return True if successful, false if not | ||
* @error Invalid client or player index | ||
**********************************************************************/ | ||
native bool:SM_AssignBuddy(client, player, bool:override = false); | ||
|
||
/********************************************************************** | ||
* Rturns the client's buddy | ||
* | ||
* @param client The client index of the player to assign | ||
* @return The client index of the player's buddy | ||
Zero if no buddy | ||
* @error Invalid client index | ||
**********************************************************************/ | ||
native SM_GetClientBuddy(client); | ||
|
||
/********************************************************************** | ||
* Set the buddy lock setting for a client | ||
* | ||
* @param client The client index of the player to assign | ||
* @param setting Setting to set, True or False | ||
* @return True if successful, false if not | ||
* @error Invalid client index | ||
**********************************************************************/ | ||
native bool:SM_LockBuddy(client, bool:setting); | ||
|
||
/********************************************************************** | ||
* Returns the buddy lock setting for a client | ||
* | ||
* @param client The client index of the player to assign | ||
* @return True if locked, false if not | ||
* @error Invalid client index | ||
**********************************************************************/ | ||
native bool:SM_IsBuddyLocked(client); | ||
|
||
/********************************************************************** | ||
* Clear a players buddy | ||
* | ||
* @param client The client index of the player to clear | ||
* @param override Whether or not to override a player lock | ||
* @return True if successful, false if not | ||
* @error Invalid client index | ||
**********************************************************************/ | ||
native bool:SM_ClearBuddy(client, bool:override = false); | ||
|
||
/********************************************************************** | ||
* Determine if the player has the supplied flags | ||
* ADMFLAG_ROOT will always return true | ||
* | ||
* @param client The client index of the player to assign | ||
* @param flags The char flag(s) to check against | ||
* @return True if valid, false if not | ||
**********************************************************************/ | ||
native bool:SM_IsValidAdmin(client, const String:flags[]); | ||
|
||
|
||
/********************************************************************** | ||
* Determine if the team is a valid team | ||
* | ||
* @param team The team index to determine if valid for | ||
currently installed/supported mod | ||
* @return True if valid, false if not | ||
**********************************************************************/ | ||
native bool:SM_IsValidTeam(team); | ||
|
||
|
||
public e_SupportedMods:GetCurrentMod() | ||
{ | ||
new String:sGameType[64]; | ||
GetGameFolderName(sGameType, sizeof(sGameType)); | ||
|
||
if (StrEqual(sGameType, "aoc", false)) | ||
{ | ||
return GameType_AOC; | ||
} | ||
if (StrEqual(sGameType, "cstrike", false)) | ||
{ | ||
return GameType_CSS; | ||
} | ||
if (StrEqual(sGameType, "dod", false)) | ||
{ | ||
return GameType_DOD; | ||
} | ||
if (StrEqual(sGameType, "ff", false)) | ||
{ | ||
return GameType_FF; | ||
} | ||
if (StrEqual(sGameType, "hidden", false)) | ||
{ | ||
return GameType_HIDDEN; | ||
} | ||
if (StrEqual(sGameType, "hl2mp", false)) | ||
{ | ||
return GameType_FF; | ||
} | ||
if (StrEqual(sGameType, "insurgency", false) || StrEqual(sGameType, "ins", false)) | ||
{ | ||
return GameType_INS; | ||
} | ||
if (StrEqual(sGameType, "l4d", false)) | ||
{ | ||
return GameType_L4D; | ||
} | ||
if (StrEqual(sGameType, "nts", false)) | ||
{ | ||
return GameType_NEO; | ||
} | ||
if (StrEqual(sGameType, "sgtls", false)) | ||
{ | ||
return GameType_SGTLS; | ||
} | ||
if (StrEqual(sGameType, "tf", false)) | ||
{ | ||
return GameType_TF; | ||
} | ||
if (StrEqual(sGameType, "zps", false)) | ||
{ | ||
return GameType_ZPS; | ||
} | ||
return GameType_Unknown; | ||
} | ||
|
||
public LoadCurrentTeams() | ||
{ | ||
switch (g_CurrentMod) | ||
{ | ||
case GameType_INS: | ||
{ | ||
g_aCurrentTeams[Unknown] = 0; | ||
g_aCurrentTeams[Spectator] = 3; | ||
g_aCurrentTeams[Team1] = 1; | ||
g_aCurrentTeams[Team2] = 2; | ||
} | ||
case default: | ||
{ | ||
g_aCurrentTeams[Unknown] = 0; | ||
g_aCurrentTeams[Spectator] = 1; | ||
g_aCurrentTeams[Team1] = 2; | ||
g_aCurrentTeams[Team2] = 3; | ||
} | ||
} | ||
} |
Oops, something went wrong.