onTextMessage

Getting triggered when the client receives a game server message example: Server Log messages.

Prototypes
onTextMessage(callback) -- callback = function(mode, text)
Parameters
    • function(mode, text): callback function
      • mode: integer
      • text: string
Usage
onTextMessage(function(mode, text)
  if string.find(text, "Warning! The murder") then
  	print("Horray!")
  end
end)