2
.gitignore
vendored
@@ -1,4 +1,4 @@
|
||||
|
||||
.vs/
|
||||
bin/
|
||||
obj/
|
||||
website/getskins.php
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace WeaponPaints
|
||||
DateTime.UtcNow >= (commandsCooldown.TryGetValue((int)player.UserId, out cooldownEndTime) ? cooldownEndTime : DateTime.UtcNow))
|
||||
{
|
||||
commandsCooldown[(int)player.UserId] = DateTime.UtcNow.AddSeconds(Config.CmdRefreshCooldownSeconds);
|
||||
ChatMenus.OpenMenu(player, giveItemMenu);
|
||||
MenuManager.OpenChatMenu(player, giveItemMenu);
|
||||
return;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Localizer["wp_command_cooldown"]))
|
||||
@@ -268,7 +268,7 @@ namespace WeaponPaints
|
||||
}
|
||||
|
||||
// Open the submenu for skin selection of the chosen weapon
|
||||
ChatMenus.OpenMenu(player, skinSubMenu);
|
||||
MenuManager.OpenChatMenu(player, skinSubMenu);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -289,7 +289,7 @@ namespace WeaponPaints
|
||||
DateTime.UtcNow >= (commandsCooldown.TryGetValue((int)player.UserId, out cooldownEndTime) ? cooldownEndTime : DateTime.UtcNow))
|
||||
{
|
||||
commandsCooldown[(int)player.UserId] = DateTime.UtcNow.AddSeconds(Config.CmdRefreshCooldownSeconds);
|
||||
ChatMenus.OpenMenu(player, weaponSelectionMenu);
|
||||
MenuManager.OpenChatMenu(player, weaponSelectionMenu);
|
||||
return;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Localizer["wp_command_cooldown"]))
|
||||
|
||||
16
Events.cs
@@ -31,7 +31,6 @@ namespace WeaponPaints
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void OnClientDisconnect(int playerSlot)
|
||||
{
|
||||
CCSPlayerController player = Utilities.GetPlayerFromSlot(playerSlot);
|
||||
@@ -305,7 +304,20 @@ namespace WeaponPaints
|
||||
)
|
||||
{
|
||||
var skeleton = GetSkeletonInstance(viewModel.Value.CBodyComponent.SceneNode);
|
||||
skeleton.ModelState.MeshGroupMask = 2;
|
||||
int[] array = { 1171, 1170, 1169, 1164, 1162, 1161, 1159, 1175, 1174, 1167, 1165, 1168, 1163, 1160, 1166, 1173 };
|
||||
int fallbackPaintKit = weapon.FallbackPaintKit;
|
||||
if (array.Contains(fallbackPaintKit))
|
||||
{
|
||||
skeleton.ModelState.MeshGroupMask = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (skeleton.ModelState.MeshGroupMask != 2)
|
||||
{
|
||||
skeleton.ModelState.MeshGroupMask = 2;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Utilities.SetStateChanged(viewModel.Value, "CBaseEntity", "m_CBodyComponent");
|
||||
|
||||
@@ -40,9 +40,19 @@ namespace WeaponPaints
|
||||
if (!isKnife && weapon.CBodyComponent != null && weapon.CBodyComponent.SceneNode != null)
|
||||
{
|
||||
var skeleton = GetSkeletonInstance(weapon.CBodyComponent.SceneNode);
|
||||
if (skeleton.ModelState.MeshGroupMask != 2)
|
||||
|
||||
int[] array = { 1171, 1170, 1169, 1164, 1162, 1161, 1159, 1175, 1174, 1167, 1165, 1168, 1163, 1160, 1166, 1173 };
|
||||
int fallbackPaintKit = weapon.FallbackPaintKit;
|
||||
if (array.Contains(fallbackPaintKit))
|
||||
{
|
||||
skeleton.ModelState.MeshGroupMask = 2;
|
||||
skeleton.ModelState.MeshGroupMask = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (skeleton.ModelState.MeshGroupMask != 2)
|
||||
{
|
||||
skeleton.ModelState.MeshGroupMask = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -61,9 +71,18 @@ namespace WeaponPaints
|
||||
if (!isKnife && weapon.CBodyComponent != null && weapon.CBodyComponent.SceneNode != null)
|
||||
{
|
||||
var skeleton = GetSkeletonInstance(weapon.CBodyComponent.SceneNode);
|
||||
if (skeleton.ModelState.MeshGroupMask != 2)
|
||||
int[] array = { 1171, 1170, 1169, 1164, 1162, 1161, 1159, 1175, 1174, 1167, 1165, 1168, 1163, 1160, 1166, 1173 };
|
||||
int fallbackPaintKit = weapon.FallbackPaintKit;
|
||||
if (array.Contains(fallbackPaintKit))
|
||||
{
|
||||
skeleton.ModelState.MeshGroupMask = 2;
|
||||
skeleton.ModelState.MeshGroupMask = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (skeleton.ModelState.MeshGroupMask != 2)
|
||||
{
|
||||
skeleton.ModelState.MeshGroupMask = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ public partial class WeaponPaints : BasePlugin, IPluginConfig<WeaponPaintsConfig
|
||||
{"weapon_negev", "Negev"},
|
||||
{"weapon_sawedoff", "Sawed-Off"},
|
||||
{"weapon_tec9", "Tec-9"},
|
||||
{"weapon_taser", "Zeus x27"},
|
||||
{"weapon_hkp2000", "P2000"},
|
||||
{"weapon_mp7", "MP7"},
|
||||
{"weapon_mp9", "MP9"},
|
||||
@@ -67,7 +68,8 @@ public partial class WeaponPaints : BasePlugin, IPluginConfig<WeaponPaintsConfig
|
||||
{ "weapon_knife_cord", "Paracord Knife" },
|
||||
{ "weapon_knife_canis", "Survival Knife" },
|
||||
{ "weapon_knife_outdoor", "Nomad Knife" },
|
||||
{ "weapon_knife_skeleton", "Skeleton Knife" }
|
||||
{ "weapon_knife_skeleton", "Skeleton Knife" },
|
||||
{ "weapon_knife_kukri", "Kukri Knife" }
|
||||
};
|
||||
|
||||
internal static WeaponPaintsConfig _config = new WeaponPaintsConfig();
|
||||
@@ -108,6 +110,7 @@ public partial class WeaponPaints : BasePlugin, IPluginConfig<WeaponPaintsConfig
|
||||
{ 28, "weapon_negev" },
|
||||
{ 29, "weapon_sawedoff" },
|
||||
{ 30, "weapon_tec9" },
|
||||
{ 31, "weapon_taser" },
|
||||
{ 32, "weapon_hkp2000" },
|
||||
{ 33, "weapon_mp7" },
|
||||
{ 34, "weapon_mp9" },
|
||||
@@ -138,14 +141,15 @@ public partial class WeaponPaints : BasePlugin, IPluginConfig<WeaponPaintsConfig
|
||||
{ 521, "weapon_knife_outdoor" },
|
||||
{ 522, "weapon_knife_stiletto" },
|
||||
{ 523, "weapon_knife_widowmaker" },
|
||||
{ 525, "weapon_knife_skeleton" }
|
||||
{ 525, "weapon_knife_skeleton" },
|
||||
{ 526, "weapon_knife_kukri" }
|
||||
};
|
||||
|
||||
public WeaponPaintsConfig Config { get; set; } = new();
|
||||
public override string ModuleAuthor => "Nereziel & daffyy";
|
||||
public override string ModuleDescription => "Skin and knife selector, standalone and web-based";
|
||||
public override string ModuleName => "WeaponPaints";
|
||||
public override string ModuleVersion => "1.4c";
|
||||
public override string ModuleVersion => "1.5a";
|
||||
|
||||
public static WeaponPaintsConfig GetWeaponPaintsConfig()
|
||||
{
|
||||
@@ -168,8 +172,13 @@ public partial class WeaponPaints : BasePlugin, IPluginConfig<WeaponPaintsConfig
|
||||
|
||||
foreach (CCSPlayerController player in players)
|
||||
{
|
||||
if (player == null || !player.IsValid || player.IsBot || player.IsHLTV || player.SteamID.ToString() == "") continue;
|
||||
if (gPlayerWeaponsInfo.ContainsKey((int)player.Index)) continue;
|
||||
if (player == null || !player.IsValid || player.IsBot || player.IsHLTV) continue;
|
||||
//if (gPlayerWeaponsInfo.ContainsKey((int)player.Index)) continue;
|
||||
|
||||
if (gPlayerWeaponsInfo.ContainsKey((int)player.Index))
|
||||
gPlayerWeaponsInfo.TryRemove((int)player.Index, out _);
|
||||
if (g_playersKnife.ContainsKey((int)player.Index))
|
||||
g_playersKnife.TryRemove((int)player.Index, out _);
|
||||
|
||||
PlayerInfo playerInfo = new PlayerInfo
|
||||
{
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.148" />
|
||||
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.163" />
|
||||
<PackageReference Include="Dapper" Version="2.1.28" />
|
||||
<PackageReference Include="MySqlConnector" Version="2.3.4" />
|
||||
<PackageReference Include="MySqlConnector" Version="2.3.5" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -62,7 +62,8 @@ class UtilsClass
|
||||
521,
|
||||
522,
|
||||
523,
|
||||
525
|
||||
525,
|
||||
526
|
||||
])
|
||||
)
|
||||
continue;
|
||||
|
||||
BIN
website/img/skins/weapon_ak47-1004.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
website/img/skins/weapon_ak47-1018.png
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
website/img/skins/weapon_ak47-1035.png
Normal file
|
After Width: | Height: | Size: 71 KiB |
BIN
website/img/skins/weapon_ak47-1070.png
Normal file
|
After Width: | Height: | Size: 83 KiB |
BIN
website/img/skins/weapon_ak47-1087.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
website/img/skins/weapon_ak47-1141.png
Normal file
|
After Width: | Height: | Size: 102 KiB |
BIN
website/img/skins/weapon_ak47-1143.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
website/img/skins/weapon_ak47-1171.png
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
website/img/skins/weapon_ak47-122.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
website/img/skins/weapon_ak47-1221.png
Normal file
|
After Width: | Height: | Size: 95 KiB |
BIN
website/img/skins/weapon_ak47-1238.png
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
website/img/skins/weapon_ak47-14.png
Normal file
|
After Width: | Height: | Size: 81 KiB |
BIN
website/img/skins/weapon_ak47-170.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
website/img/skins/weapon_ak47-172.png
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
website/img/skins/weapon_ak47-180.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
website/img/skins/weapon_ak47-226.png
Normal file
|
After Width: | Height: | Size: 83 KiB |
BIN
website/img/skins/weapon_ak47-282.png
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
website/img/skins/weapon_ak47-300.png
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
website/img/skins/weapon_ak47-302.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
website/img/skins/weapon_ak47-316.png
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
website/img/skins/weapon_ak47-340.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
website/img/skins/weapon_ak47-341.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
website/img/skins/weapon_ak47-380.png
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
website/img/skins/weapon_ak47-394.png
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
website/img/skins/weapon_ak47-422.png
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
website/img/skins/weapon_ak47-44.png
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
website/img/skins/weapon_ak47-456.png
Normal file
|
After Width: | Height: | Size: 79 KiB |
BIN
website/img/skins/weapon_ak47-474.png
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
website/img/skins/weapon_ak47-490.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
website/img/skins/weapon_ak47-506.png
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
website/img/skins/weapon_ak47-524.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
website/img/skins/weapon_ak47-600.png
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
website/img/skins/weapon_ak47-639.png
Normal file
|
After Width: | Height: | Size: 87 KiB |
BIN
website/img/skins/weapon_ak47-656.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
website/img/skins/weapon_ak47-675.png
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
website/img/skins/weapon_ak47-707.png
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
website/img/skins/weapon_ak47-72.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
website/img/skins/weapon_ak47-724.png
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
website/img/skins/weapon_ak47-745.png
Normal file
|
After Width: | Height: | Size: 79 KiB |
BIN
website/img/skins/weapon_ak47-795.png
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
website/img/skins/weapon_ak47-801.png
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
website/img/skins/weapon_ak47-836.png
Normal file
|
After Width: | Height: | Size: 80 KiB |
BIN
website/img/skins/weapon_ak47-885.png
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
website/img/skins/weapon_ak47-921.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
website/img/skins/weapon_ak47-941.png
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
website/img/skins/weapon_ak47-959.png
Normal file
|
After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 70 KiB |