!skins thread-safe and checking version

This commit is contained in:
daffyyyy
2023-12-06 14:47:26 +01:00
parent b0790729be
commit 6d44e582be
6 changed files with 65 additions and 19 deletions

View File

@@ -95,7 +95,7 @@ namespace WeaponPaints
if (@event.Defindex == 42 || @event.Defindex == 59)
{
CCSPlayerController? player = @event.Userid;
if (!Utility.IsPlayerValid(player) || !player.PawnIsAlive || g_knifePickupCount[(int)player.Index] >= 2) return HookResult.Continue;
if (!Utility.IsPlayerValid(player) || !player.PawnIsAlive || g_knifePickupCount[(int)player.Index] >= 1) return HookResult.Continue;
if (g_playersKnife.ContainsKey((int)player.Index)
&&
@@ -105,7 +105,6 @@ namespace WeaponPaints
RemovePlayerKnife(player, true);
AddTimer(0.3f, () => GiveKnifeToPlayer(player));
}
}
return HookResult.Continue;