mirror of
https://github.com/Nereziel/cs2-WeaponPaints.git
synced 2026-05-18 21:21:56 +00:00
2.9a
- Team based items
This commit is contained in:
@@ -81,7 +81,7 @@ namespace WeaponPaints
|
||||
return HookResult.Continue;
|
||||
|
||||
if (WeaponSync != null)
|
||||
_ = Task.Run(async () => await WeaponSync.SyncStatTrakToDatabase(playerInfo, weaponInfos));
|
||||
_ = Task.Run(async () => await WeaponSync.SyncStatTrakToDatabase(playerInfo));
|
||||
|
||||
if (Config.Additional.SkinEnabled)
|
||||
{
|
||||
@@ -253,9 +253,13 @@ namespace WeaponPaints
|
||||
private HookResult OnPlayerDeath(EventPlayerDeath @event, GameEventInfo info)
|
||||
{
|
||||
CCSPlayerController? player = @event.Attacker;
|
||||
CCSPlayerController? victim = @event.Userid;
|
||||
|
||||
if (player is null || !player.IsValid)
|
||||
return HookResult.Continue;
|
||||
|
||||
if (victim == null || victim == player)
|
||||
return HookResult.Continue;
|
||||
|
||||
if (!GPlayerWeaponsInfo.TryGetValue(player.Slot, out _)) return HookResult.Continue;
|
||||
|
||||
@@ -265,7 +269,7 @@ namespace WeaponPaints
|
||||
|
||||
int weaponDefIndex = weapon.AttributeManager.Item.ItemDefinitionIndex;
|
||||
|
||||
if (!GPlayerWeaponsInfo[player.Slot].TryGetValue(weaponDefIndex, out var weaponInfo) || weaponInfo.Paint == 0)
|
||||
if (!GPlayerWeaponsInfo[player.Slot][player.Team].TryGetValue(weaponDefIndex, out var weaponInfo) || weaponInfo.Paint == 0)
|
||||
return HookResult.Continue;
|
||||
|
||||
if (!weaponInfo.StatTrak) return HookResult.Continue;
|
||||
|
||||
Reference in New Issue
Block a user