EasyTeams for Rust allows you to easily create minigame and custom event teams on your server. Please note that the current version of EasyTeams is a BETA, pending further testing. If you notice any bugs, please let me know in the support thread.
[B][U]Features:[/U][/B][LIST][]Easily create multiple teams with full control over which players are on what teams.[]Save and load event settings from the data file.[]Configurable number of team lives for each team. Once lives are depleted, player's won't be able to respawn for their team.[]Allows for an automatic spectator team. Once lives are used up, players (from all teams) will be moved to the spectator team, if it is enabled.[]Permissions included.[]Saves inventory, position, and health of players. They will be restored when they leave the event or when it is ended.[/LIST][B][U]How it Works:[/U][/B]Using EasyTeams is simple. Just use the commands (shown below) to create a team. You can then add or remove players from the team, set the team spawn point and Kit, set the number of lives for the team, enable the spectator team, etc.
[B][U]Commands:[/U][/B]EasyTeams currently supports the following commands:
[B]Event Saving and Loading:[/B][LIST][][I]/teams[/I]: Views the help text for the plugin.[][I]/teams_save eventName[/I]: Saves the current event settings under the name 'eventName'. Saved to the data file.[][I]/teams_load eventName[/I]: Loads the event with the name 'eventName' from the data file. If no eventName is given, will list available events to load.[][I]/teams_reload[/I]: Reloads the data file, so that changes can be loaded in without having to reload the plugin.[/LIST][B]Player Commands:[/B][LIST][][I]/teams_join teamName[/I]: If players are allowed to join (see Data File), adds them to a random team or the one with the lowest player count. If the team name is specified, and they are allowed to join a specified team (see Data File), adds them to the team with name 'teamName'.[][I]/teams_leave[/I]: Removes the player from the event.[/LIST]
[B]Event Commands:[/B][LIST][][I]/teams_spectate true/false[/I]: Enables or disables the spectator team, which is a third team that can be spawned outside the arena, somewhere they can spectate from.[][I]/teams_start[/I]: Starts the event, teleporting all players to their respective teams spawn points and giving them the specified kit.[][I]/teams_stop[/I]: Stops the event, teleporting all players to their previous locations and restoring their items and health.[][I]/teams_restart[/I]: Restarts the event, moving all players back to their teams spawn points.[/LIST]
[B]Team Setup Commands:[/B][LIST][][I]/teams_create teamName[/I]: Creates a new team with the name 'teamName'.[][I]/teams_delete teamName[/I]: Deletes the team with name 'teamName'.[][I]/teams_add teamName player1Name player2Name player3Name...[/I]: Adds all the specified players to the team with name 'teamName'.[][I]/teams_remove teamName player1Name player2Name player3Name...[/I]: Removes all the specified players from the team with name 'teamName'.[][I]/teams_view teamName[/I]: Views the specified team with name 'teamName'. If no team is given, shows all event settings and all teams.[][I]/teams_clear[/I]: Clears all EasyTeams current event settings (does not affect saved event settings).[/LIST][B]Team Settings Commands:[/B][LIST][][I]/teams_setspawn teamName[/I]: Sets the spawn/respawn point for the team with name 'teamName' to your current world location.[][I]/teams_setkit teamName kitName[/I]: Sets the respawn kit for the team with name 'teamName' to the kit with name 'kitName'.[/LIST]
[LIST][][I]/teams_create teamname[/I]: Creates a new team with the name 'teamname'.[][I]/teams_delete teamname[/I]: Deletes the team with name 'teamname'.[][I]/teams_add teamname player1name player2name ...[/I]: Adds all the players specified to the team with name 'teamname'.[][I]/teams_remove teamname player1name player2name ...[/I]: Removes all the players specified from the team with name 'teamname'.[][I]/teams_setspawn teamname[/I]: Sets the spawn point for the team with name 'teamname' to your current position.[][I]/teams_setkit teamname kitname[/I]: Sets the kit for the team with name 'teamname' to 'kitname'.[][I]/teams_setlives numlives[/I]: Sets the number of lives for ALL currently specified teams to 'numlives'. Must be a whole number. -1 signifies infinite lives. 0 signifies no respawns after initial life.[][I]/teams_setlives teamname numlives[/I]: Sets the number of lives for the team with name 'teamname' to 'numlives'. Must be a whole number. -1 signifies infinite lives. 0 signifies no respawns after initial life.[][I]/teams_spectate true/false[/I]: Enables or disables the spectator team. When enabled, once a teams lives are expended, any players that die will be automatically moved to the spectator team.[][I]/teams_view <teamname>[/I]: Shows all the teams, their players and their setup. 'teamname' parameter is optional, and if included will only show the details of the team with name 'teamname'.[][I]/teams_clear[/I]: Deletes all teams and clears all setup values.[][I]/teams_leave[/I]: Removes the player from the event and any team they are in, returning them to their saved position.[][I]/teams_start[/I]: Starts the event, teleporting all players to the teams spawn and giving them their teams kit.[][I]/teams_stop[/I]: Ends the event, returning all players to their previous positions and restoring their inventory and health.[][I]/teams_restart[/I]: Restarts the event. Any players on the spectator team will be returned to their previous team.[/LIST][B][U]Permissions:[/U][/B][LIST][][I]easyteams.admin[/I]: Grants access to all the EasyTeams commands.[][I]easyteams.edit[/I]: Grants access to the [I]create, delete, add, remove, setspawn, setkit, spectate [/I]and [I]clear[/I] commands.[][I]easyteams.view[/I]: Grants access to the [I]view[/I] command.[][I]easyteams.start[/I]: Grants access to the [I]start[/I] and [I]restart [/I]commands.[][I]easyteams.stop: [/I]Grants access to the [I]stop[/I] command.[][I]easyteams.join[/I]: Grants access to the [I]join [/I]command.[]easyteams.joinspecific: Grants access to the [I]join teamName[/I] command.[/LIST][B][U]Using the Permissions:[/U][/B]Permissions are granted using Oxides permissions system.To grant permission to a [B]user[/B]:[CODE]oxide.grant user "PLAYERNAME" PERMISSIONNAME[/CODE]To grant permission to a [B]group[/B]:[CODE]oxide.grant group "GROUPNAME" PERMISSIONNAME[/CODE]
[B][U]Config Options:[/U][/B]The configuration file is generated at [B]oxide/config/EasyTeams.json[/B]. The options it includes are as below.[LIST][*][I]UsePermissionsOnly (false)[/I]: Determines whether only the permissions system (not IsAdmin) is used to for command permissions.[/LIST][B][U]Default Config:[/U][/B][CODE]{"DefaultLives": -1,"PermissionRequiredToLeave": false,"SpectateWhenNoLivesRemaining": false,"UsePermissionsOnly": false}[/CODE]
[B][U]Data File Options:[/U][/B]The data file is generated at [B]oxide/data/EasyTeamsData.json[/B] and allows you to change the settings of any saved event. Remember to use [I]/teams_reload[/I] after making any changes, then [I]/teams_load[/I].
The available [B]Event Settings[/B] are as follows:[LIST][]allowPlayersJoin: whether players can join the game themselves (true) using /teams_join or if an admin/event coordinator has to add them manually (false). If true, they will be placed on a random, joinable team (if autoBalanceTeamsOnJoin is false) or the joinable team with the least players (if autoBalanceTeamsOnJoin is true).[]allowPlayersJoinSpecificTeams: whether players can join a specific team using /teams_join TeamName. Requires allowPlayersJoin to be true.[]joinInProgress: whether players can join a random joinable team once the event is started.[]joinSpecificTeamInProgress: whether players can join a specific team once the event has started.[]autoBalanceTeamsOnJoin: if true, players will be placed on the joinable team that has the least number of players.[]allowTeamSwitching: if true, players can use /teams_join again to join a different team.[]endWhenSingleTeamRemaining: not yet properly implemented.[]restartWhenSingleTeamRemaining: not yet properly implemented.[]keepEventInventoryAsReward: not yet properly implemented (should still function the same as it did before, but needs some bug fixing).[]allowRewardClaiming: not yet properly implemented.[]roundRestartTimer: not yet properly implemented.[]numberOfTopTeams: number of top teams to be given reward kits. ie. if set to 3, the top 3 teams can be given kits depending on their placing, etc. Not yet properly implemented.[]topTeamRewardKits: the name of the kits used as rewards, not yet properly implemented.[/LIST]The available [B]Team Settings [/B]are as follows:[LIST][]maxPlayers: the maximum number of players that can be on that team before it is full. Admins/event coordinators can always exceed this by manually adding players to the team. -1 indicates no maximum, while 0 makes the team unjoinable by players.[*]joinable: if true, the team can be joined by players using /teams_join (assuming the necessary event settings are also true).[/LIST][B][U]Example Usage:[/U][/B]See the FAQ for example usage and other frequently asked questions.
[B][U]To-Do:[/U][/B][LIST][]Notify of lives remaining on respawn.[]Auto event ending/restarting.[]Event rewards/inventory.[]Event restarting.[]Console commands.[/LIST][B][U]Credits:[/U][/B]The 95% of the code in this plugin was written by myself. However, some of it was inspired from other peoples plugins. They are as follows.[LIST][][URL='http://oxidemod.org/plugins/authors/k1lly0u.36455/']k1lly0u[/URL] for [URL='http://oxidemod.org/plugins/event-manager.740/']EventManager[/URL]. Methods for saving and restoring inventories, and this plugin in general, are inspired from EventManager.[*][URL='http://oxidemod.org/members/wulf.1115/']Wulf[/URL] for his help with Lang API and other Oxide standards.[/LIST]
The original author may request that this plugin be removed and there is a risk that the plugin may be unavailable in the future.
Note that the current maintainer may not have permission to assign a license to the plugin if they are not the original author, so explicit permission would need to be obtained from the original author in order for the plugin to remain openly available and guarantee that it will be around for all to enjoy going forward.

