- Dokumentacja
- Zdarzenia serwera
- onChatMessage
Zdarzenie
onChatMessage
Na czat idzie wiadomość (od gracza albo ze skryptu). Możesz ją wstrzymać.
Obsługa
addEventHandler("onChatMessage", root, function(theMessage, theElement) ... end)Parametry
theMessagestring- Treść.
theElementelement- Nadawca albo zasób.
Źródło
source to źródło wiadomości albo root.
cancelEvent() wstrzymuje wiadomość.
Przykład
addEventHandler("onChatMessage", root, function(message)
outputServerLog("[czat] " .. message)
end)