Merge pull request #1 from stefanx111/main

admin name in css_say
This commit is contained in:
Dawid Bepierszcz 2023-12-03 21:11:00 +01:00 • committed by GitHub
commit f19c594568
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -527,7 +527,7 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig<CS2_SimpleAdmin
[RequiresPermissions("@css/chat")] [RequiresPermissions("@css/chat")]
public void OnAdminSayCommand(CCSPlayerController? caller, CommandInfo command) public void OnAdminSayCommand(CCSPlayerController? caller, CommandInfo command)
{ {
Server.PrintToChatAll(Helper.ReplaceTags($" {Config.Messages.AdminSayPrefix} {command.GetCommandString[command.GetCommandString.IndexOf(' ')..]}")); Server.PrintToChatAll(Helper.ReplaceTags($" {Config.Messages.AdminSayPrefix}".Replace("{ADMIN}", caller?.PlayerName == null ? "Console" : caller.PlayerName) + command.GetCommandString[command.GetCommandString.IndexOf(' ')..]));
} }
[ConsoleCommand("css_psay", "Private message a player.")] [ConsoleCommand("css_psay", "Private message a player.")]