diff --git a/src/Globals.cs b/src/Globals.cs index 32a3b6d..074671d 100644 --- a/src/Globals.cs +++ b/src/Globals.cs @@ -5,5 +5,5 @@ public partial class Refiller public RefillerConfig Config { get; set; } = new(); public override string ModuleName => "Refiller"; public override string ModuleAuthor => "github.com/oscar-wos/Refiller"; - public override string ModuleVersion => "1.0.0"; + public override string ModuleVersion => "1.0.1"; } \ No newline at end of file diff --git a/src/Refiller.cs b/src/Refiller.cs index 07beb64..26e6193 100644 --- a/src/Refiller.cs +++ b/src/Refiller.cs @@ -1,7 +1,6 @@ using CounterStrikeSharp.API; using CounterStrikeSharp.API.Core; using CounterStrikeSharp.API.Modules.Utils; -using Microsoft.Extensions.Logging; namespace Refiller; @@ -42,7 +41,7 @@ public HookResult OnPlayerDeath(EventPlayerDeath @event, GameEventInfo info) Server.NextFrame(() => { - foreach (var weapon in weapons) + foreach (var weapon in weapons.Where(w => w != null && w.IsValid)) { var weaponData = weapon.Value!.As().VData;