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);