mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-09-27 20:17:04 +02:00
Alias for css_disconnected
- css_last - css_lastX (X = value from config)
This commit is contained in:
parent
e272449f3c
commit
b1ab6e0e0d
2 changed files with 4 additions and 0 deletions
|
|
@ -112,6 +112,9 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig<CS2_SimpleAdmin
|
||||||
PluginInfo.ShowAd(ModuleVersion);
|
PluginInfo.ShowAd(ModuleVersion);
|
||||||
if (Config.EnableUpdateCheck)
|
if (Config.EnableUpdateCheck)
|
||||||
Task.Run(async () => await PluginInfo.CheckVersion(ModuleVersion, _logger));
|
Task.Run(async () => await PluginInfo.CheckVersion(ModuleVersion, _logger));
|
||||||
|
|
||||||
|
AddCommand($"css_last{Config.OtherSettings.DisconnectedPlayersHistoryCount}",
|
||||||
|
"Show last x disconnected players", OnDisconnectedCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static TargetResult? GetTarget(CommandInfo command)
|
private static TargetResult? GetTarget(CommandInfo command)
|
||||||
|
|
|
||||||
|
|
@ -477,6 +477,7 @@ public partial class CS2_SimpleAdmin
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConsoleCommand("css_disconnected")]
|
[ConsoleCommand("css_disconnected")]
|
||||||
|
[ConsoleCommand("css_last")]
|
||||||
[CommandHelper(whoCanExecute: CommandUsage.CLIENT_ONLY)]
|
[CommandHelper(whoCanExecute: CommandUsage.CLIENT_ONLY)]
|
||||||
[RequiresPermissions("@css/kick")]
|
[RequiresPermissions("@css/kick")]
|
||||||
public void OnDisconnectedCommand(CCSPlayerController? caller, CommandInfo command)
|
public void OnDisconnectedCommand(CCSPlayerController? caller, CommandInfo command)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue