This plugin is designed to be a no-fuss, on-the-fly manager for admins running small lan (or online) tournaments for csgo. This plugin was inspired by experiences at small lans where the plugins they were using were too bloated for the small-scale usage. The only setup prior to running my plugin is optional team configuration. It goes without saying that this plugin works for online matches as well.
The easiest way to start a new match is
easylan_newmatch <ct team> <t team> <optional flag 1> <optional flag 2>. The optional flags aren't required and have no order. You can also do each part manually:
PHP Code:
// Commands can be done separately.
ct_team team1
t_team team2
easylan_forcestart knife
// Or all three of these actions can be grouped together into one command:
easylan_newmatch team1 team2 knife forcestart
- You can quickly make sure every team is on the correct side using server commands t_team <teamname> and ct_team <teamname>. To use the features of this command, admins should create a text file for each team with the steam32ids of all the players and place them in the folder /addons/sourcemod/configs/easylan/teams. The format of <teamname>.txt should have one steam32id (STEAM:0:0_...) per line. There is an example team.txt in the folder and the contents look like such:
PHP Code:
STEAM_0:0:12345678
STEAM_0:0:23456781
STEAM_0:0:34567812
STEAM_0:0:45678123
STEAM_0:0:56781234
- Use easylan_forcestart to force start the game even all players are not ready'd. easylan_forcestart knife does the same thing but with a knife round. easylan_notlive suspends the plugin from tracking the game.
- Players can use "!stop" in the chat during a game if they have a technical issue. If no damage was done in the round yet, the game will automatically restore the previous round. This feature can be disabled with easylan_emergencystop_enabled 0. Players should use "!pause" for a regular tactical pause.
- The chat commands "!playon" and "!unpause" resume the game.
- If easylan_automaticstop_enabled is set, the game will pause automatically on player disconnect when the game is live. Additionally, the plugin will attempt to automatically restore the round if there was no player contact before the player disconnected. This can be disabled with easylan_automaticstop_enabled set to 0.
- The plugin locks the teams when the game is live, and puts any reconnected player back on the right team. Last, it attempts to restore the player's money.
- By default, the plugin will not allow non-verified players (meaning teams config file is used) to take actions (!ready, etc.). That means that if you are not using team config files, set easylan_require_authorization to 0. As a summary:
easylan_require_authorization 1 ==> admin must create team txt files
easylan_require_authorization 0 ==> team txt files are optional
- The plugin doesn't interfere with gotv or spectators.
- The current score is printed at the end of each round like most plugins of this type.
- If you encounter an issue as an admin or need to match medic the last round, you can try easylan_reinitialize to fix the problem.
CVARS:
PHP Code:
// ConVars for plugin "easylan.smx"
// Enables easy lan manager.
// -
// Default: "1"
easylan_enabled "1"
// Enables the emergency !stop command.
// -
// Default: "1"
easylan_emergencystop_enabled "1"
// Enables an automatic stops for rounds before any damage is made.
// -
// Default: "1"
easylan_automaticstop_enabled "1"
// If 0, non-authenticated users (not in team.txt) can perform actions such as !ready and !stay.
// It is recommended to leave 1, and use team config files.
// -
// Default: "1"
easylan_require_authorization "1"
// Change this convar to put the competition name in the score logger
// -
// Default: "Tournament Name"
easylan_tournament_name "Tournament Name"
Commands:
PHP Code:
// Configures a new match and starts a warmup session.
// Server command only. Optional flags are "knife" and "forcestart".
// forcestart skips the warmup period, knife adds a knife round
//
easylan_newmatch <ct team> <t team> <optional flag 1> <optional flag 2>
// Force starts a match that is in warmup. If there isn't a match to start, it will force start a new match anyway. Executes live.cfg. Locks teams.
// Server command only. Optional argument flag "knife" adds a kniferound to the game.
//
easylan_forcestart
// Lists the teams that are present in the proper config folder.
// Server command only.
//
easylan_listteams
// Looks for <teamname>.txt and puts those clients on the ct team. Cannot be used when a game is live.
// Server command only.
//
ct_team <teamname>
// Looks for <teamname>.txt and puts those clients on the t team. Cannot be used when a game is live.
// Server command only.
//
t_team <teamname>
// Releases the game from the plugin. Clients won't notice anything.
// Server command only.
//
easylan_notlive
// Attaches the game back to the plugin and restores last backup round.
// Server command only.
//
easylan_reinitialize
// !stop pauses the game, and attempts to restore the round if there hasn't been any player contact.
// Client command
//
sm_stop
// !playon resumes the game
// Client command
//
sm_playon
// !switch swaps the teams on kniferound win
// Client command
//
sm_switch
// !stay skeeps the teams on kniferound win
// Client command
//
sm_stay
Installation Instructions: Download the zip archive, unzip it, and merge it into your servers 'csgo' folder.
Known Problems:
- HintText still shows if server empties. easylan_notlive fixes the issue.
- Money restore not working right.
To Do:
- Translation support
- Team menu in game (!setup)
- Ability to construct new teams using team menu
Changes in 1.9:
-!switch, !stay, !ready, !notready commands will ensure player is on the team's txt config.
-Players on join will be moved to the proper team.
Changes in 2.0:
- Added easylan_require_authorization convar.
- Fixed misc bugs
- Code now adheres to style conventions. Some old style syntax still exists, however.
- hostname resets with server hibernation
- fixed an issue where !stop triggered in unwanted contexts
Tournament admins are encouraged to use this plugin. However, tournament admins should test the plugin first to see if it meets their needs. Others are encourage to fork this code, but you may find its organization is garbage and very redundant.