mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-17 18:39:07 +00:00
1.2.7c
- `css_hide` - Hide on scoreboard Code stolen from https://github.com/DeadSwimek/cs2-hideadmin Thanks DeadSwimek ;]
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -277,6 +277,20 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig<CS2_SimpleAdmin
|
||||
}
|
||||
}
|
||||
|
||||
[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")]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user