Added local chat (10m radius)

This commit is contained in:
hydrant
2018-10-30 21:43:17 +01:00
parent 8bdb21f503
commit e5be3783f6
2 changed files with 15 additions and 0 deletions

13
Server/Events/Chat.cs Normal file
View File

@@ -0,0 +1,13 @@
using GTANetworkAPI;
namespace reallife_gamemode.Server.Events
{
public class Chat : Script
{
[ServerEvent(Event.ChatMessage)]
public void ChatEvent(Client player, string message)
{
NAPI.Player.GetPlayersInRadiusOfPlayer(10, player).ForEach(p => p.SendChatMessage($"{player.Name} sagt: {message}"));
}
}
}