Status: Supported.
The multi1v1 plugin sets up any number of players in 1v1-situations on specially made maps and they fight in a ladder-type system each round. The winners move up an arena, and the losers go down an arena. Players choose between specific round types (for example: "rifle", "pistol", "awp"), and the plugin automatically spawns and gives players the appropriate weapons each round start.
Also see the AlliedModders thread and the the wiki for more information.
Check the multi1v1.inc file to see what natives and forwards are avaliable to tweak the behavior of the plugin in more sophisticated ways.
Sometimes it's easier to add something in a seperate plugin than add more convars, thus some features may be in support plugins. These are all optional.
Stable releases are in the GitHub Releases section.
I strongly recommend using the Updater plugin which can automatically update the plugin for bug fixes. Any changes made through an automatic update will be backwards compatible.
You may also download the latest development build if you wish. If you report any bugs from these, make sure to include the build number (when typing sm plugins list
into the server console, the build number will be displayed with the plugin version).
Sourcemod 1.9 or later.
Download the archive and extract the files to the game server. From the download, you should have installed the following (to the csgo
directory):
addons/sourcemod/plugins/multi1v1.smx
addons/sourcemod/configs/multi1v1_weapons.cfg
addons/sourcemod/translations
cfg/sourcemod/multi1v1
The file cfg/sourcemod/multi1v1/multi1v1.cfg
will be autogenerated when the plugin is first run and you can tweak it if you wish.
You may also tweak the values in cfg/sourcemod/multi1v1/game_cvars.cfg
, which is executed by the plugin each map start.
Here is a brief list of some cvars available. See the auto-generated cfg/sourcemod/multi1v1/multi1v1.cfg
file for descriptions.
addons/sourcemod/configs/multi1v1_weapons.cfg
contains the list of weapons that are available under the rifle and pistol menus. You are free to add or remove weapons from this as long as they match the correct format. Note that the team
part is only for making sure the player gets the correct weapon skin, otherwise it has no effect.
There is a wiki page that explains how to setup the stats system with the provided components.
The build process is managed by my smbuilder project. You can still compile multi1v1.sp without it, however.
I have a workshop collection of maps I know of. The "am_" prefix stands for aimmulti, reflecting the fact that the maps are similar to aim maps but there are multiple copies of them.
Note: standard maps (de_dust2, etc.) or aim maps (aim_map, etc.) will not work with this plugin. Maps must be custom-made with multiple arenas.
Guidelines for making a multi-1v1 map:
sm_multi1v1_verbose_spawns
can be set to 1 to log information about how the spawns were partitioned into arenas on map changesNote: SQLite is not supported. Only MySQL is.
You should add a database named mult1v1 to your databases.cfg file like so:
"multi1v1"
{
"driver" "mysql"
"host" "123.123.123.123" // localhost works too
"database" "game_servers_database"
"user" "mymulti1v1server"
"pass" "strongpassword"
"timeout" "10"
"port" "3306" // whatever port MySQL is set up on, 3306 is default
}
To create a MySQL user and database on the database server, you can run:
CREATE DATABASE game_servers_database;
CREATE USER 'mymulti1v1server'@'123.123.123.123' IDENTIFIED BY 'strongpassword';
GRANT ALL PRIVILEGES ON game_servers_database.multi1v1_stats TO 'mymulti1v1server'@'123.123.123.123';
FLUSH PRIVILEGES;
Make sure to change the IP, the username, and the password. You should probably change the database as well, especially if you already have one set up you can use.
Schema:
mysql> describe multi1v1_stats;
+--------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+-------------+------+-----+---------+-------+
| accountID | int(11) | NO | PRI | 0 | |
| serverID | int(11) | NO | PRI | 0 | |
| auth | varchar(64) | NO | | | |
| name | varchar(64) | NO | | | |
| wins | int(11) | NO | | 0 | |
| losses | int(11) | NO | | 0 | |
| rating | float | NO | | 1500 | |
| lastTime | int | NO | | 0 | |
| recentRounds | int | NO | | 0 | |
+--------------+-------------+------+-----+---------+-------+
Note that the accountID
field is what is returned by GetSteamAccountID, which is "the lower 32 bits of the full 64-bit Steam ID (referred to as community id by some) and is unique per account."
auth
is the steam ID auth string, and the lastTime
field is the last time the player connected to the server.
The time comes from GetTime, which returns the "number of seconds since unix epoch".
recentRounds
is simply incremented each time the player completes a round. This can be used, for example, to check the rounds played on a daily basis and lower ratings if a player didn't play a certain number of rounds.
Player choices (round type preferences, weapon choices) can be saved so they persist across maps for players (via the SourceMod clientprefs API). Installing SQLite should be sufficient for this to work.
If you have a game-hosting specific provider, they may already have SQLite installed
There are two ways to add your own round types: through writing another plugin using the forward and natives in multi1v1.inc, and defining a round type in a config file.
This is the simpler approach, but you are fairly restricted in the logic you can use. The file to edit is addons/sourcemod/configs/multi1v1_customrounds.cfg
.
Here is an example file that adds a scout round and a knife round:
"CustomRoundTypes"
{
"scout"
{
"name" "Scout"
"ranked" "1"
"ratingFieldName" "scoutRating"
"optional" "1"
"enabled" "1"
"armor" "1"
"helmet" "1"
"weapons"
{
"weapon_knife" ""
"weapon_ssg08" ""
}
}
"knife"
{
"name" "Knife"
"ranked" "0"
"optional" "1"
"enabled" "1"
"armor" "1"
"helmet" "1"
"weapons"
{
"weapon_knife" ""
}
}
}
Using the natives in multi1v1.inc, you can write more complex logic into a round type. To get a simple example, check multi1v1_kniferounds.sp. The key is calling Multi1v1_AddRoundType
within the Multi1v1_OnRoundTypesAdded
forward.
typedef RoundTypeWeaponHandler = function void (int client);
typedef RoundTypeMenuHandler = function void (int client);
// Registers a new round type by the plugin.
native int Multi1v1_AddRoundType(const char[] displayName,
const char[] internalName,
RoundTypeWeaponHandler weaponsHandler=Multi1v1_NullWeaponHandler,
bool optional=true,
bool ranked=false,
const char[] ratingFieldName="",
bool enabled=true);
Note that the multi1v1 plugin will
ratingFieldName
parameter ( note that these columns are only created on database-connections)A Discord channel is available for general discussion.
First, check the issue tracker to ask questions or make a suggestion. If you have a suggestion you can mark it as an enhancement.
Guidelines
git checkout -b mybranchname