mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-17 18:39:07 +00:00
1.2.0a UPDATE
Required CSS 124
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using CounterStrikeSharp.API.Core;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using Dapper;
|
||||
using MySqlConnector;
|
||||
using System.Data;
|
||||
@@ -88,6 +89,19 @@ namespace CS2_SimpleAdmin
|
||||
return activeMutes;
|
||||
}
|
||||
|
||||
public async Task<int> GetPlayerMutes(string steamId)
|
||||
{
|
||||
await using var connection = _dbConnection;
|
||||
await connection.OpenAsync();
|
||||
|
||||
int muteCount;
|
||||
string sql = "SELECT COUNT(*) FROM sa_mutes WHERE player_steamid = @PlayerSteamID";
|
||||
|
||||
muteCount = await connection.ExecuteScalarAsync<int>(sql, new { PlayerSteamID = steamId });
|
||||
|
||||
return muteCount;
|
||||
}
|
||||
|
||||
public async Task UnmutePlayer(string playerPattern, int type = 0)
|
||||
{
|
||||
if (playerPattern == null || playerPattern.Length <= 1)
|
||||
|
||||
Reference in New Issue
Block a user