mirror of
https://github.com/Nereziel/cs2-WeaponPaints.git
synced 2026-02-26 13:07:40 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f99c9b2767 | ||
|
|
6a2d28c303 | ||
|
|
27a2ae5be9 | ||
|
|
0af9177f07 |
@@ -305,6 +305,8 @@ namespace WeaponPaints
|
|||||||
|
|
||||||
private void OnTick()
|
private void OnTick()
|
||||||
{
|
{
|
||||||
|
if (!Config.Additional.ShowSkinImage) return;
|
||||||
|
|
||||||
foreach (var player in Utilities.GetPlayers().Where(p =>
|
foreach (var player in Utilities.GetPlayers().Where(p =>
|
||||||
p is not null && p.IsValid && p.PlayerPawn != null && p.PlayerPawn.IsValid &&
|
p is not null && p.IsValid && p.PlayerPawn != null && p.PlayerPawn.IsValid &&
|
||||||
(LifeState_t)p.LifeState == LifeState_t.LIFE_ALIVE && p.SteamID.ToString().Length == 17
|
(LifeState_t)p.LifeState == LifeState_t.LIFE_ALIVE && p.SteamID.ToString().Length == 17
|
||||||
@@ -312,7 +314,7 @@ namespace WeaponPaints
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (Config.Additional.ShowSkinImage && PlayerWeaponImage.TryGetValue(player.Slot, out string? value) && !string.IsNullOrEmpty(value))
|
if (PlayerWeaponImage.TryGetValue(player.Slot, out string? value) && !string.IsNullOrEmpty(value))
|
||||||
{
|
{
|
||||||
player.PrintToCenterHtml("<img src='{PATH}'</img>".Replace("{PATH}", value));
|
player.PrintToCenterHtml("<img src='{PATH}'</img>".Replace("{PATH}", value));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.3b";
|
public override string ModuleVersion => "2.3c";
|
||||||
|
|
||||||
public static WeaponPaintsConfig GetWeaponPaintsConfig()
|
public static WeaponPaintsConfig GetWeaponPaintsConfig()
|
||||||
{
|
{
|
||||||
@@ -258,7 +258,9 @@ public partial class WeaponPaints : BasePlugin, IPluginConfig<WeaponPaintsConfig
|
|||||||
Password = config.DatabasePassword,
|
Password = config.DatabasePassword,
|
||||||
Database = config.DatabaseName,
|
Database = config.DatabaseName,
|
||||||
Port = (uint)config.DatabasePort,
|
Port = (uint)config.DatabasePort,
|
||||||
Pooling = true
|
Pooling = true,
|
||||||
|
MaximumPoolSize = 640,
|
||||||
|
ConnectionReset = false
|
||||||
};
|
};
|
||||||
|
|
||||||
_database = new(builder.ConnectionString);
|
_database = new(builder.ConnectionString);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.193" />
|
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.193" />
|
||||||
<PackageReference Include="Dapper" Version="2.1.35" />
|
<PackageReference Include="Dapper" Version="2.1.35" />
|
||||||
<PackageReference Include="MySqlConnector" Version="2.3.5" />
|
<PackageReference Include="MySqlConnector" Version="2.3.6" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -233,6 +233,7 @@ namespace WeaponPaints
|
|||||||
|
|
||||||
string query;
|
string query;
|
||||||
object parameters;
|
object parameters;
|
||||||
|
|
||||||
if (existingRecordCount > 0)
|
if (existingRecordCount > 0)
|
||||||
{
|
{
|
||||||
query = "UPDATE `wp_player_skins` SET `weapon_paint_id` = @paintId, `weapon_wear` = @wear, `weapon_seed` = @seed WHERE `steamid` = @steamid AND `weapon_defindex` = @weaponDefIndex";
|
query = "UPDATE `wp_player_skins` SET `weapon_paint_id` = @paintId, `weapon_wear` = @wear, `weapon_seed` = @seed WHERE `steamid` = @steamid AND `weapon_defindex` = @weaponDefIndex";
|
||||||
|
|||||||
Reference in New Issue
Block a user