OnChatMessage
This event is triggered when a player send a message in the chat.
C# Syntax
[ServerEvent(Event.ChatMessage)]
Parameters
- player: parameter input should be in Player type
- message: parameter input should be in string type
Example
[ServerEvent(Event.ChatMessage)]
public void OnChatMessage(Player player, string message)
{
NAPI.Chat.SendChatMessageToAll($"{player.Name} ({player.Handle}): {message}");
}