【UPDATE 1.7.3a】

🆕  What's new and what's changed:
- Fixed problem when you can't add admin because of the same group names on multiple servers from now on it takes in order -> server id and if there is no -> global
- Added ability to add penalties via SteamID
- Added ability to display penalty messages only for admins (ShowActivityType = 3)
- Reverted OnClientConnect to EventPlayerFullConnect
This commit is contained in:
Dawid Bepierszcz
2025-02-09 15:37:01 +01:00
parent 8cc0398f6b
commit 64e5f1156e
16 changed files with 301 additions and 32 deletions

View File

@@ -12,7 +12,7 @@ namespace CS2_SimpleAdmin_ExampleModule;
public class CS2_SimpleAdmin_ExampleModule: BasePlugin
{
public override string ModuleName => "[CS2-SimpleAdmin] Example module";
public override string ModuleVersion => "v1.0.0";
public override string ModuleVersion => "v1.0.1";
public override string ModuleAuthor => "daffyy";
private int? _serverId;
@@ -68,6 +68,13 @@ public class CS2_SimpleAdmin_ExampleModule: BasePlugin
commandInfo.ReplyToCommand($"Your total mutes: {playerInfo?.TotalMutes}");
commandInfo.ReplyToCommand($"Your total silences: {playerInfo?.SteamId}");
}
[ConsoleCommand("css_testaddban")]
[CommandHelper(whoCanExecute: CommandUsage.SERVER_ONLY)]
public void OnAddBanCommand(CCSPlayerController? caller, CommandInfo commandInfo)
{
_sharedApi?.IssuePenalty(new SteamID(76561197960287930), null, PenaltyType.Ban, "My super reason", 10);
}
private void OnPlayerPenaltied(PlayerInfo player, PlayerInfo? admin, PenaltyType penaltyType,
string reason, int duration, int? penaltyId, int? serverId)