Skip to content

Commit 265cf63

Browse files
authored
1.0.3
1 parent 3360cdd commit 265cf63

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

Config/Helper.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ public static void DropAllWeapons(CCSPlayerController player)
9494

9595
foreach (var weapon in player.PlayerPawn.Value.WeaponServices.MyWeapons)
9696
{
97-
if (weapon is { IsValid: true, Value.IsValid: true } && !weapon.Value.DesignerName.Contains("weapon_knife"))
98-
{
99-
player.DropActiveWeapon();
100-
101-
weapon.Value.Remove();
102-
}
97+
if (weapon == null || !weapon.IsValid) continue;
98+
var weaponValue = weapon.Value;
99+
if (weaponValue == null || !weaponValue.IsValid) continue;
100+
if (weaponValue.DesignerName != null && weaponValue.DesignerName.Contains("weapon_knife") || weaponValue.DesignerName != null && weaponValue.DesignerName.Contains("weapon_c4"))continue;
101+
if(weaponValue.DesignerName == null)continue;
102+
Utilities.RemoveItemByDesignerName(player, weaponValue.DesignerName);
103103
}
104104

105105
}

Spawn-Loadout-GoldKingZ.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ namespace Spawn_Loadout_GoldKingZ;
1313
public class SpawnLoadoutGoldKingZ : BasePlugin
1414
{
1515
public override string ModuleName => "Give Weapons On Spawn (Depend The Map Name + Team Side)";
16-
public override string ModuleVersion => "1.0.2";
16+
public override string ModuleVersion => "1.0.3";
1717
public override string ModuleAuthor => "Gold KingZ";
1818
public override string ModuleDescription => "https://github.com/oqyh";
1919

20-
2120
public override void Load(bool hotReload)
2221
{
2322
Configs.Shared.CookiesModule = ModuleDirectory;

0 commit comments

Comments
 (0)