Skip to content
Jérôme Leclercq edited this page Dec 8, 2020 · 1 revision

API: packet.SetHandler

Description:

Associate a callback function with a packet name.

Prototype:

packet.SetHandler(name: string, handler: function | nil)

Parameters:

  1. name: The packet name.
  2. handler: A function that will be called when a packet of this kind is retrieved (nil can be used to disable this handler).
Clone this wiki locally