Update welcome message and command handling

This commit is contained in:
Juzlus 2025-08-29 19:25:17 +02:00
parent 2e0dff8b96
commit 28a7d0048c
6 changed files with 5 additions and 15 deletions

View file

@ -3,10 +3,8 @@ using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Modules.Admin;
using CounterStrikeSharp.API.Modules.Commands;
using CounterStrikeSharp.API.Modules.Entities.Constants;
using CounterStrikeSharp.API.Modules.Memory;
using CounterStrikeSharp.API.Modules.Utils;
using jRandomSkills.src.utils;
using System.Runtime.InteropServices;
using static jRandomSkills.jRandomSkills;
namespace jRandomSkills
@ -45,14 +43,6 @@ namespace jRandomSkills
return commands.Split(',').Select(c => c.Trim());
}
private static void AddCommands(IEnumerable<string> commands, string description, CommandInfo.CommandCallback commandAction)
{
foreach (var command in commands)
{
Instance.AddCommand($"css_{command}", description, commandAction);
}
}
[CommandHelper(minArgs: 0, whoCanExecute: CommandUsage.CLIENT_ONLY)]
private static void Command_UseTypeSkill(CCSPlayerController? player, CommandInfo _)
{
@ -185,7 +175,7 @@ namespace jRandomSkills
private static void Command_CustomCommand(CCSPlayerController? player, CommandInfo command)
{
if (player == null) return;
string param = command.GetArg(1);
string param = command.ArgString;
Server.ExecuteCommand(param);
}