-- name: ! Chatless Co-op -- description: It turns off chat!!!!! -- author: \#FF0\ \#090\Ko\#0B0\mi\#0F0\i-64!\#FF0\ -- FIXED: Appending field directly onto the built-in synchronized global table gGlobalSyncTable.chatlessCoopEnabled = true djui_popup_create("the chat uhh he off lol", 2) function on_chat_message(m, msg) if string.sub(msg, 1, 1) == "/" then return false end if gGlobalSyncTable.chatlessCoopEnabled then return false -- Chat is allowed else if m and m.playerIndex == gNetworkPlayers.playerIndex then djui_chat_message_create("\\#ff5555\\Chat is currently disabled by the host.") end return true -- BLOCK standard chat messages across the server end end function toggle_chat_command(msg) if not network_is_server() then djui_chat_message_create("host only") return true end gGlobalSyncTable.chatlessCoopEnabled = not gGlobalSyncTable.chatlessCoopEnabled if gGlobalSyncTable.chatlessCoopEnabled then djui_popup_create("chat off", 3) djui_chat_message_create("chat turned off.") else djui_popup_create("chat on.", 3) djui_chat_message_create("chat turned on.") end return true end hook_event(HOOK_ON_CHAT_MESSAGE, on_chat_message) hook_chat_command("togglechat", "- toggle chat host only", toggle_chat_command)