From f10585e50dab4b0992726ef82f4d6de293f081c5 Mon Sep 17 00:00:00 2001 From: Elouan Martinet Date: Wed, 5 Jun 2024 15:08:45 +0200 Subject: [PATCH] Add et_Chat callback documentation --- callbacks.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/callbacks.rst b/callbacks.rst index 19d511c..8a1aecb 100644 --- a/callbacks.rst +++ b/callbacks.rst @@ -231,3 +231,15 @@ et_SpawnEntitiesFromString() ---------------------------- Called when an entity definition is parsed to spawn gentities. + + +intercepted, message = et_Chat( sender, receiver, message ) +----------------------------------------------------------- + +Called whenever a player sends a chat message. It is called for each player receiving the message. + +* **sender** is the player sending the message. +* **receiver** is the player receiving the message. +* **message** is the chat message. + +Returns an integer (intercepted) and a string (message). If intercepted is 1, the chat message will be replaced.