player:emit
player:emit(name: string, payload: string?)
Sends an event to the player's client.
The message is reliable: it arrives, and in order. On the client it becomes a NOV_EVENT.
Parameters#
- name (
string): event name, 64 characters at most - payload (
string, optional): free text, 60,000 characters at most. Empty by default
Example#
on("playerJoin", function(player)
player:emit("welcome", "Welcome to Noverwyn!")
end)
Notes#
- The content is one text: to send several values, choose a format (for example
"12;Potions"). - The
NovEventstructure of the client library keeps 511 bytes of text: the rest is cut.
See also#
client:<name>for the other direction