From ec0d4f4d5a0d89744a22c6fa4bf1eb3993495e52 Mon Sep 17 00:00:00 2001 From: Dawid Bepierszcz <41084667+daffyyyy@users.noreply.github.com> Date: Fri, 26 Apr 2024 10:02:32 +0200 Subject: [PATCH] 2.4d - Updated for latest css --- VERSION | 2 +- WeaponAction.cs | 8 ++++---- WeaponPaints.cs | 4 ++-- WeaponPaints.csproj | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/VERSION b/VERSION index f4e7acdd..4461c655 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.4c \ No newline at end of file +2.4d \ No newline at end of file diff --git a/WeaponAction.cs b/WeaponAction.cs index 4311ba83..d73d5f8b 100644 --- a/WeaponAction.cs +++ b/WeaponAction.cs @@ -65,7 +65,7 @@ namespace WeaponPaints int playerTeam = player.TeamNum; - Dictionary> weaponsWithAmmo = new Dictionary>(); + Dictionary> weaponsWithAmmo = []; foreach (var weapon in weapons) { @@ -101,7 +101,7 @@ namespace WeaponPaints if (!weaponsWithAmmo.TryGetValue(weaponByDefindex, out List<(int, int)>? value)) { - value = new List<(int, int)>(); + value = []; weaponsWithAmmo.Add(weaponByDefindex, value); } @@ -121,8 +121,8 @@ namespace WeaponPaints try { - player.ExecuteClientCommand("slot 3"); - player.ExecuteClientCommand("slot 3"); + player.ExecuteClientCommandFromServer("slot 3"); + player.ExecuteClientCommandFromServer("slot 3"); var weapon = player.PlayerPawn.Value.WeaponServices.ActiveWeapon; if (weapon is null || !weapon.IsValid || weapon.Value == null) return; diff --git a/WeaponPaints.cs b/WeaponPaints.cs index ccca9e83..94a4909f 100644 --- a/WeaponPaints.cs +++ b/WeaponPaints.cs @@ -10,7 +10,7 @@ using System.Collections.Concurrent; namespace WeaponPaints; -[MinimumApiVersion(201)] +[MinimumApiVersion(215)] public partial class WeaponPaints : BasePlugin, IPluginConfig { internal static WeaponPaints Instance { get; private set; } = new(); @@ -160,7 +160,7 @@ public partial class WeaponPaints : BasePlugin, IPluginConfig "Nereziel & daffyy"; public override string ModuleDescription => "Skin, gloves, agents and knife selector, standalone and web-based"; public override string ModuleName => "WeaponPaints"; - public override string ModuleVersion => "2.4c"; + public override string ModuleVersion => "2.4d"; public static WeaponPaintsConfig GetWeaponPaintsConfig() { diff --git a/WeaponPaints.csproj b/WeaponPaints.csproj index e8330b6f..6ed87b7f 100644 --- a/WeaponPaints.csproj +++ b/WeaponPaints.csproj @@ -9,9 +9,9 @@ - + - +