- Better gloves operations
- Changed gloves table
This commit is contained in:
Dawid Bepierszcz
2024-02-20 12:51:14 +01:00
parent 267de3c4de
commit b1920f312c
8 changed files with 52 additions and 33 deletions

View File

@@ -46,6 +46,17 @@ namespace WeaponPaints
if (player is null || !player.IsValid || !player.UserId.HasValue || player.IsBot ||
player.IsHLTV || player.SteamID.ToString().Length != 17) return HookResult.Continue;
PlayerInfo playerInfo = new PlayerInfo
{
UserId = player.UserId,
Index = (int)player.Index,
SteamId = player.SteamID.ToString(),
Name = player.PlayerName,
IpAddress = player.IpAddress?.Split(":")[0]
};
if (weaponSync != null)
Task.Run(async () => await weaponSync.SyncWeaponPaintsToDatabase(playerInfo));
if (Config.Additional.SkinEnabled)
gPlayerWeaponsInfo.TryRemove((int)player.Index, out _);