mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-18 10:43:23 +00:00
1.3.5a
- Added custom command to menu - Better ungag/unmute/unsilence handling - Fixed css_psay from console
This commit is contained in:
@@ -78,6 +78,8 @@ namespace CS2_SimpleAdmin
|
||||
[RequiresPermissions("@css/chat")]
|
||||
public void OnAdminPrivateSayCommand(CCSPlayerController? caller, CommandInfo command)
|
||||
{
|
||||
string callerName = caller == null ? "Console" : caller.PlayerName;
|
||||
|
||||
TargetResult? targets = GetTarget(command);
|
||||
if (targets == null) return;
|
||||
List<CCSPlayerController> playersToTarget = targets!.Players.Where(player => player != null && player.IsValid && player.SteamID.ToString().Length == 17 && !player.IsHLTV).ToList();
|
||||
@@ -92,7 +94,7 @@ namespace CS2_SimpleAdmin
|
||||
|
||||
playersToTarget.ForEach(player =>
|
||||
{
|
||||
player.PrintToChat(StringExtensions.ReplaceColorTags($"({caller!.PlayerName}) {utf8String}"));
|
||||
player.PrintToChat(StringExtensions.ReplaceColorTags($"({callerName}) {utf8String}"));
|
||||
});
|
||||
|
||||
command.ReplyToCommand(StringExtensions.ReplaceColorTags($" Private message sent!"));
|
||||
|
||||
Reference in New Issue
Block a user