From e36c5943c60e17a8aa7e440ffe60493db49b1f98 Mon Sep 17 00:00:00 2001 From: nahkampfaffe Date: Sat, 3 Aug 2019 11:49:57 +0200 Subject: [PATCH] another improve in dice system --- ReallifeGamemode.Server/Commands/UserCommands.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Commands/UserCommands.cs b/ReallifeGamemode.Server/Commands/UserCommands.cs index ea9de6f1..95b9a551 100644 --- a/ReallifeGamemode.Server/Commands/UserCommands.cs +++ b/ReallifeGamemode.Server/Commands/UserCommands.cs @@ -21,7 +21,13 @@ namespace ReallifeGamemode.Server.Commands Random rnd = new Random(); int number = rnd.Next(1, 7); - ChatService.SendMessage(player, "* " + player.Name + " + würfelt eine " + number); + var peopleInRange = NAPI.Player.GetPlayersInRadiusOfPlayer(7, player); + + foreach (var managedClient in peopleInRange) + { + if (!managedClient.IsLoggedIn()) return; + ChatService.SendMessage(managedClient, "* " + player.Name + " hat eine " + number + " gewürfelt."; + } }