- Updated for latest css
This commit is contained in:
Dawid Bepierszcz
2024-04-26 10:02:32 +02:00
parent a8ba645292
commit ec0d4f4d5a
4 changed files with 9 additions and 9 deletions

View File

@@ -1 +1 @@
2.4c 2.4d

View File

@@ -65,7 +65,7 @@ namespace WeaponPaints
int playerTeam = player.TeamNum; int playerTeam = player.TeamNum;
Dictionary<string, List<(int, int)>> weaponsWithAmmo = new Dictionary<string, List<(int, int)>>(); Dictionary<string, List<(int, int)>> weaponsWithAmmo = [];
foreach (var weapon in weapons) foreach (var weapon in weapons)
{ {
@@ -101,7 +101,7 @@ namespace WeaponPaints
if (!weaponsWithAmmo.TryGetValue(weaponByDefindex, out List<(int, int)>? value)) if (!weaponsWithAmmo.TryGetValue(weaponByDefindex, out List<(int, int)>? value))
{ {
value = new List<(int, int)>(); value = [];
weaponsWithAmmo.Add(weaponByDefindex, value); weaponsWithAmmo.Add(weaponByDefindex, value);
} }
@@ -121,8 +121,8 @@ namespace WeaponPaints
try try
{ {
player.ExecuteClientCommand("slot 3"); player.ExecuteClientCommandFromServer("slot 3");
player.ExecuteClientCommand("slot 3"); player.ExecuteClientCommandFromServer("slot 3");
var weapon = player.PlayerPawn.Value.WeaponServices.ActiveWeapon; var weapon = player.PlayerPawn.Value.WeaponServices.ActiveWeapon;
if (weapon is null || !weapon.IsValid || weapon.Value == null) return; if (weapon is null || !weapon.IsValid || weapon.Value == null) return;

View File

@@ -10,7 +10,7 @@ using System.Collections.Concurrent;
namespace WeaponPaints; namespace WeaponPaints;
[MinimumApiVersion(201)] [MinimumApiVersion(215)]
public partial class WeaponPaints : BasePlugin, IPluginConfig<WeaponPaintsConfig> public partial class WeaponPaints : BasePlugin, IPluginConfig<WeaponPaintsConfig>
{ {
internal static WeaponPaints Instance { get; private set; } = new(); internal static WeaponPaints Instance { get; private set; } = new();
@@ -160,7 +160,7 @@ public partial class WeaponPaints : BasePlugin, IPluginConfig<WeaponPaintsConfig
public override string ModuleAuthor => "Nereziel & daffyy"; public override string ModuleAuthor => "Nereziel & daffyy";
public override string ModuleDescription => "Skin, gloves, agents and knife selector, standalone and web-based"; public override string ModuleDescription => "Skin, gloves, agents and knife selector, standalone and web-based";
public override string ModuleName => "WeaponPaints"; public override string ModuleName => "WeaponPaints";
public override string ModuleVersion => "2.4c"; public override string ModuleVersion => "2.4d";
public static WeaponPaintsConfig GetWeaponPaintsConfig() public static WeaponPaintsConfig GetWeaponPaintsConfig()
{ {

View File

@@ -9,9 +9,9 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.203" /> <PackageReference Include="CounterStrikeSharp.API" Version="1.0.215" />
<PackageReference Include="Dapper" Version="2.1.35" /> <PackageReference Include="Dapper" Version="2.1.35" />
<PackageReference Include="MySqlConnector" Version="2.3.6" /> <PackageReference Include="MySqlConnector" Version="2.3.7" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup> </ItemGroup>