mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-09-27 20:17:04 +02:00
Update CS2-SimpleAdmin.cs
This commit is contained in:
parent
2105d80f52
commit
15ab2d9e65
1 changed files with 2 additions and 2 deletions
|
|
@ -1139,7 +1139,7 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig<CS2_SimpleAdmin
|
||||||
|
|
||||||
[ConsoleCommand("css_team")]
|
[ConsoleCommand("css_team")]
|
||||||
[RequiresPermissions("@css/kick")]
|
[RequiresPermissions("@css/kick")]
|
||||||
[CommandHelper(minArgs: 2, usage: "<#userid or name> [<ct/tt/spec>]", whoCanExecute: CommandUsage.CLIENT_AND_SERVER)]
|
[CommandHelper(minArgs: 2, usage: "<#userid or name> [<ct/tt/spec>] [-k]", whoCanExecute: CommandUsage.CLIENT_AND_SERVER)]
|
||||||
public void OnTeamCommand(CCSPlayerController? caller, CommandInfo command)
|
public void OnTeamCommand(CCSPlayerController? caller, CommandInfo command)
|
||||||
{
|
{
|
||||||
string teamName = command.GetArg(2).ToLower();
|
string teamName = command.GetArg(2).ToLower();
|
||||||
|
|
@ -1173,7 +1173,7 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig<CS2_SimpleAdmin
|
||||||
{
|
{
|
||||||
if (player.TeamNum != ((byte)teamNum))
|
if (player.TeamNum != ((byte)teamNum))
|
||||||
{
|
{
|
||||||
if (player.PawnIsAlive && teamNum != CsTeam.Spectator)
|
if (player.PawnIsAlive && command.GetArg(3) == null && teamNum != CsTeam.Spectator)
|
||||||
player.SwitchTeam(teamNum);
|
player.SwitchTeam(teamNum);
|
||||||
else
|
else
|
||||||
player.ChangeTeam(teamNum);
|
player.ChangeTeam(teamNum);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue