Hello, I'm not very experienced with C# and I have been working away at this for a couple of days. I would like to duplicate and change this section of code so instead of it sending a Server Broadcast it would send a Reply / Message to the specific player:
private void PublicMessage(string key, params KeyValuePair<string, string>[] replacements)
{
var message = lang.GetMessage(key, this);
foreach (var replacement in replacements)
message = message.Replace($"{{{replacement.Key}}}", replacement.Value);
server.Broadcast(message);
Puts(message);
}So in theory it would allow me to keep this code which changes the parameters of the mute
if (broadcast)
{
PublicMessage("Muted Time",
new KeyValuePair<string, string>("initiator", SanitizeName(player.Name)),
new KeyValuePair<string, string>("player", SanitizeName(target.Name)),
new KeyValuePair<string, string>("time", FormatTime(timeSpan)),
new KeyValuePair<string, string>("reason", reason));
}Would appreciate any help that you have to offer,
Hinshee