sendMessageTo
Sends a message to a specific player in the server.
This method can be used to send private messages or group messages to specific players or groups. The player must be specified using their unique ID or player manager.
Syntax
engine.chat.sendMessageTo(player, message);
Parameters
Name | Type | Description |
---|---|---|
playerOrPlayerId | PlayerManager or number | The player manager or player id |
message | string | The message to be send the player |
Example
// using a player manager
engine.chat.sendMessageTo(player, 'Welcome to the {green}Server');
// using the player id
engine.chat.sendMessageTo(1, 'Welcome to the {green}Server');
Available on: Server