Skip to content

Commit

Permalink
1.0.0 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
splewis committed Jul 14, 2014
1 parent c3cd262 commit 1216094
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ clean:
rm -rf *.smx *.zip

package: build
zip -r pugsetup csgo
zip -r pugsetup csgo README.md LICENSE
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
csgo-pug-setup
===========================

This is a useful plugin for managing pug games or 10 mans. It allows a player to type .setup into chat and select (from a menu):
This is a useful plugin for managing pug games, especially **10 mans**/gathers. It allows a player to type .setup into chat and select (from a menu):
- how to choose the teams (players do it manually, random teams, captains select teams)
- how to choose the map (use the current map, do a map vote using maps from addons/sourcemod/configs/pugselect/maps.txt)
- how to choose the map (use the current map, do a map vote using maps from addons/sourcemod/configs/pugsetup/maps.txt)

The goal is to allow a lightweight, easy-to-use setup system that automates as much as possible with as few dependencies as possible. However,
The goal is to allow a **lightweight, easy-to-use setup system** that automates as much as possible with as few dependencies as possible. However,
the goal isn't fully automated - it assumes the players know each other or there is an admin. There is no mechanism for kicking players or anything similar.

Part of being lightweight is doing nothing that can interfere with the server's performance. When the game is actually live, the plugin is doing extremely little work - the only thing it does is read chat commands (e.g. pausing when a captain types .pause). Otherwise, there is 0 effect on gameplay and the rounds progress the same as without sourcemod on the server. This is in contrast to the WarMod plugin or what ESEA server use, where they are tracking the overall score, overriding the in-game warmup period, etc.
Part of being lightweight is doing nothing that can interfere with the server's performance. **When the game is actually live, the plugin is doing extremely little work** - the only thing it does is read chat commands (e.g. pausing when a captain types .pause). Otherwise, there is 0 effect on gameplay and the rounds progress the same as without sourcemod on the server. This is in contrast to the WarMod plugin or what ESEA server use, where they are tracking the overall score, overriding the in-game warmup period, etc.

### Download
You should be able to get the most recent **pugsetup.zip** file from https://github.com/splewis/csgo-pug-setup/releases.


### Installation
Download pugsetup.zip and extract the files to the game server. You should have installed at least:
- csgo/addons/sourcemod/configs/pugsetup/standard_maps.txt **(you might want to edit this)**
- csgo/addons/sourcemod/configs/pugsetup/maps.txt **(you might want to edit this)**
- csgo/addons/sourcemod/plugins/pugsetup.smx
- csgo/cfg/sourcemod/pugsetup/warmup.cfg **(you might want to edit this)**
- csgo/cfg/sourcemod/pugsetup/standard.cfg **(you might want to edit this)**
Expand All @@ -43,9 +43,9 @@ Some commands that are important are:
- **.pause**
- **.unpause**
- **.capt** gives the pug leader a menu to select captains
- .rand selects random captains
- .leader gives a menu to change the game leader
- .endgame, force ends the game safely (only the leader can do this, note that this **resets the leader** to nobody)
- **.rand** selects random captains
- **.leader** gives a menu to change the game leader
- **.endgame**, force ends the game safely (only the leader can do this, note that this **resets the leader** to nobody)

The chat commands are mostly aliases for sourcemod admin commands, so an admin can override things if needed. The bold commands are only available through these admin commands and have no chat aliases (other than the default sourcemod ones, e.g. !leader or /leader go with sm_leader)

Expand All @@ -61,14 +61,13 @@ These use the generic admin flag "b":
- sm_pause
- sm_unpause

Generally you don't need the admin (sm_) commands, but they may come in helpful if a captain/leader doesn't know about the .pause feature or
**Generally you don't need the admin (sm_) commands**, but they may come in helpful if a captain/leader doesn't know about the .pause feature or
you need to take leardership of the pug.


### Convars
### ConVars
These are put in an autogenerated file at **cfg/sourcemod/pugsetup.cfg**, once you start the plugin go edit that file if you wish.
- **sm_pugsetup_warmup_cfg** should store where the warmup config goes, defaults to the included file **sourcemod/pugsetup/warmup.cfg**)
- **sm_pugsetup_live_cfg** should store where the warmup config goes, defaults to the included file **sourcemod/pugsetup/standard.cfg**
- **sm_pugsetup_autolo3** controls if a .start (or !start) is needed for going live in a 10man/random team game
- **sm_pugsetup_autorecord** controls if the plugin should autorecord a gotv demo (you may need to add some extra cvars to your cfgs, such as tv_enable 1)
- **sm_pugsetup_requireadmin** controls if an admin flag ("g" for change map permissions) is needed to use the setup command (i.e. admins must use !setup and .setup no longer works)
3 changes: 3 additions & 0 deletions csgo/addons/sourcemod/configs/pugsetup/maps.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
de_cache
de_cbble
de_dust2
de_inferno
de_mirage
de_nuke
de_overpass
de_train
14 changes: 0 additions & 14 deletions csgo/addons/sourcemod/scripting/pugsetup.sp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#define PLUGIN_VERSION "1.0.0"
#define UPDATE_URL "https://dl.dropboxusercontent.com/u/76035852/csgo-pug-setup/csgo-pug-setup.txt"
#pragma semicolon 1

#include <adminmenu>
Expand All @@ -8,8 +7,6 @@
#include <sdktools>
#include <sourcemod>

#undef REQUIRE_PLUGIN
#include <updater>


/************************
Expand All @@ -30,7 +27,6 @@

/** ConVar handles **/
new Handle:g_hCvarVersion = INVALID_HANDLE;
new Handle:g_hAutoUpdate = INVALID_HANDLE;
new Handle:g_hWarmupCfg = INVALID_HANDLE;
new Handle:g_hLiveCfg = INVALID_HANDLE;
new Handle:g_hAutorecord = INVALID_HANDLE;
Expand Down Expand Up @@ -119,7 +115,6 @@ public OnPluginStart() {
g_hAutorecord = CreateConVar("sm_pugsetup_autorecord", "0", "Should the plugin attempt to record a gotv demo each game, requries tv_enable 1 to work");
g_hRequireAdminToSetup = CreateConVar("sm_pugsetup_requireadmin", "0", "If a client needs the map-change admin flag to use the .setup command");
g_hMapVoteTime = CreateConVar("sm_pugsetup_mapvote_time", "20", "How long the map vote should last if using map-votes", _, true, 10.0);
g_hAutoUpdate = CreateConVar("sm_multi1v1_autoupdate", "0", "Should the plugin attempt to use the auto-update (Updater) plugin?");

/** Create and exec plugin's configuration file **/
AutoExecConfig(true, "pugsetup", "sourcemod/pugsetup");
Expand Down Expand Up @@ -148,18 +143,9 @@ public OnPluginStart() {
/** Event hooks **/
HookEvent("cs_win_panel_match", Event_MatchOver);

if (GetConVarInt(g_hAutoUpdate) != 0 && LibraryExists("updater")) {
Updater_AddPlugin(UPDATE_URL);
}

g_LiveTimerRunning = false;
}

public OnLibraryAdded(const String:name[]) {
if (GetConVarInt(g_hAutoUpdate) != 0 && LibraryExists("updater")) {
Updater_AddPlugin(UPDATE_URL);
}
}

public OnClientConnected(client) {
g_Teams[client] = CS_TEAM_SPECTATOR;
Expand Down
2 changes: 1 addition & 1 deletion csgo/addons/sourcemod/scripting/pugsetup/maps.sp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static CreateDefaultMapFile() {
decl String:dirName[PLATFORM_MAX_PATH];
BuildPath(Path_SM, dirName, sizeof(dirName), "configs/pugsetup", dirName);
if (!DirExists(dirName))
CreateDirectory(dirName, 511);
CreateDirectory(dirName, 751);

decl String:mapFile[PLATFORM_MAX_PATH];
BuildPath(Path_SM, mapFile, sizeof(mapFile), "configs/pugsetup/maps.txt", mapFile);
Expand Down

0 comments on commit 1216094

Please sign in to comment.