mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-17 18:39:07 +00:00
Reworked the database layer to support both MySQL and SQLite via new provider classes and migration scripts for each backend. Updated the build workflow to support building and packaging additional modules, including StealthModule and BanSoundModule, and improved artifact handling. Refactored command registration to allow dynamic registration/unregistration and improved API event handling. Updated dependencies, project structure, and configuration checks for better reliability and extensibility. Added new language files, updated versioning, and removed obsolete files.
**⚠️ Warning: SQLite support is currently experimental.
Using this version requires reconfiguration of your database settings!
Plugin now uses UTC time. Please adjust your configurations accordingly!
**
41 lines
1.2 KiB
C#
41 lines
1.2 KiB
C#
using System.Numerics;
|
|
using CounterStrikeSharp.API.Modules.Entities;
|
|
|
|
namespace CS2_SimpleAdminApi;
|
|
|
|
public class PlayerInfo(
|
|
int? userId,
|
|
int slot,
|
|
SteamID steamId,
|
|
string name,
|
|
string? ipAddress,
|
|
int totalBans = 0,
|
|
int totalMutes = 0,
|
|
int totalGags = 0,
|
|
int totalSilences = 0,
|
|
int totalWarns = 0)
|
|
{
|
|
public int? UserId { get; } = userId;
|
|
public int Slot { get; } = slot;
|
|
public SteamID SteamId { get; } = steamId;
|
|
public string Name { get; } = name;
|
|
public string? IpAddress { get; } = ipAddress;
|
|
public int TotalBans { get; set; } = totalBans;
|
|
public int TotalMutes { get; set; } = totalMutes;
|
|
public int TotalGags { get; set; } = totalGags;
|
|
public int TotalSilences { get; set; } = totalSilences;
|
|
public int TotalWarns { get; set; } = totalWarns;
|
|
public bool WaitingForKick { get; set; } = false;
|
|
public List<(ulong SteamId, string PlayerName)> AccountsAssociated { get; set; } = [];
|
|
public DiePosition? DiePosition { get; set; }
|
|
public bool IsLoaded { get; set; }
|
|
}
|
|
|
|
public class DiePosition(Vector3 position, Vector3 angle)
|
|
{
|
|
public Vector3 Position { get; } = position;
|
|
public Vector3 Angle { get; } = angle;
|
|
}
|
|
|
|
|