Skip to content

Commit 58935ba

Browse files
committed
Use RemoveWeapons instead of loop.
1 parent 7022105 commit 58935ba

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

BasicAdmin/BasicAdmin.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,8 @@ public void OnDisarmCommand(CCSPlayerController? caller, CommandInfo info)
296296
info.ReplyToCommand(FormatMessage($"Target {info.GetArg(1)} not found."));
297297
return;
298298
}
299-
300-
foreach (var weapon in player!.Pawn.Value.WeaponServices!.MyWeapons)
301-
{
302-
weapon.Value.Remove();
303-
}
299+
300+
player!.RemoveWeapons();
304301

305302
if (!Config.HideActivity)
306303
Server.PrintToChatAll(FormatAdminMessage($"{caller!.PlayerName} disarmed {player!.PlayerName}."));

0 commit comments

Comments
 (0)