From b813a422a2b64695381710f8018b0c645cae239f Mon Sep 17 00:00:00 2001 From: daffyyyy Date: Tue, 12 Dec 2023 12:24:09 +0100 Subject: [PATCH] Update CS2-SimpleAdmin.cs --- CS2-SimpleAdmin.cs | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/CS2-SimpleAdmin.cs b/CS2-SimpleAdmin.cs index 3bf9c1c..a13db46 100644 --- a/CS2-SimpleAdmin.cs +++ b/CS2-SimpleAdmin.cs @@ -1381,25 +1381,6 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig ", whoCanExecute: CommandUsage.CLIENT_AND_SERVER)] - public void OnGiveCommand(CCSPlayerController? caller, CommandInfo command) - { - if(!GetTarget(command, out var player) || player == null || !player.IsValid) return; - string weaponName = command.GetArg(2); - - //check if weapon is knife - if(weaponName.Contains("_knife") || weaponName.Contains("bayonet")){ - command.ReplyToCommand($"Cannot Give {weaponName} because it's illegal to be given."); - return; - } - //give the weapon to player and announce it - player.GiveNamedItem(weaponName); - Server.PrintToChatAll(Helper.ReplaceTags($" {Config.Prefix} {Config.Messages.AdminGiveMessage}".Replace("{ADMIN}", caller?.PlayerName == null ? "Console" : caller.PlayerName).Replace("{WEAPON}", weaponName.Split("_")[1])).Replace("{PLAYER}",player.PlayerName)); - } - private static TargetResult? GetTarget(CommandInfo command) { var matches = command.GetArgTargetResult(1);