listen

Getting triggered when received a chat message from a certain player.

Prototypes
listen(name, callback) -- callback = function(text, channelId, pos)
Parameters
    • name: player name
    • function(text, channelId, pos): callback function
      • text: message (string value)
      • channelId: channel id (integer value)
      • pos: position object of sender (contains x, y, z)
Usage
-- Wait for a message from Vincent
listen("Vincent", function(text, channelId, pos)
	print("Vincent said " .. text)
end)