Skip to content

Commit

Permalink
1.2.7c
Browse files Browse the repository at this point in the history
- `css_hide` - Hide on scoreboard
  • Loading branch information
daffyyyy committed Jan 17, 2024
1 parent 38020e6 commit 0d43b96
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
16 changes: 15 additions & 1 deletion CS2-SimpleAdmin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig<CS2_SimpleAdmin
public override string ModuleName => "CS2-SimpleAdmin";
public override string ModuleDescription => "Simple admin plugin for Counter-Strike 2 :)";
public override string ModuleAuthor => "daffyy";
public override string ModuleVersion => "1.2.7b";
public override string ModuleVersion => "1.2.7c";

public CS2_SimpleAdminConfig Config { get; set; } = new();

Expand Down Expand Up @@ -277,6 +277,20 @@ public void OnSilentModeCommand(CCSPlayerController? caller, CommandInfo command
}
}

[ConsoleCommand("css_hide")]
[CommandHelper(whoCanExecute: CommandUsage.CLIENT_ONLY)]
[RequiresPermissions("@css/kick")]
public void OnHideCommand(CCSPlayerController? caller, CommandInfo command)
{
if (caller == null) return;

caller.PlayerPawn.Value!.CommitSuicide(true, false);
caller.ChangeTeam(CsTeam.Spectator);
AddTimer(1.0f, () => { caller.ChangeTeam(CsTeam.None); });

command.ReplyToCommand("You are hidden now");
}

[ConsoleCommand("css_who")]
[CommandHelper(minArgs: 1, usage: "<#userid or name>", whoCanExecute: CommandUsage.CLIENT_AND_SERVER)]
[RequiresPermissions("@css/generic")]
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Manage your Counter-Strike 2 server by simple commands :)
- css_deladmin <steamid> - Delete admin by steamid // @css/root
- css_reladmin - Reload sql admins // @css/root
- css_silentmode - Enable or disable silentmode for admins // @css/kick
- css_hide - Hide admin on scoreboard // @css/kick
- css_admin - Display all admin commands // @css/generic
- css_who <#userid or name> - Display informations about player // @css/generic
- css_players - Display player list // @css/generic
Expand Down

0 comments on commit 0d43b96

Please sign in to comment.