diff --git a/vmf/scripts/mods/vmf/modules/core/chat.lua b/vmf/scripts/mods/vmf/modules/core/chat.lua index 4562a62..bb0994f 100644 --- a/vmf/scripts/mods/vmf/modules/core/chat.lua +++ b/vmf/scripts/mods/vmf/modules/core/chat.lua @@ -3,8 +3,11 @@ local vmf = get_mod("VMF") -- Constants used as parameters in some 'chat_manager's functions local CHANNEL_ID = 1 local MESSAGE_SENDER = "" -local LOCAL_PLAYER_ID = 0 -- VT2 only -local LOCALIZATION_PARAM = "" +local LOCAL_PLAYER_ID = 0 -- VT2 only +local LOCALIZATION_PARAMETERS = {} -- VT2 only +local LOCALIZE = false -- VT2 only +local LOCALIZE_PARAMETERS = false -- VT2 only +local LOCALIZATION_PARAM = "" -- VT1 only local IS_SYSTEM_MESSAGE = false local POP_CHAT = true local IS_DEV = true @@ -17,9 +20,12 @@ local function send_system_message(peer_id, message) if VT1 then RPC.rpc_chat_message(peer_id, CHANNEL_ID, MESSAGE_SENDER, message, LOCALIZATION_PARAM, IS_SYSTEM_MESSAGE, POP_CHAT, IS_DEV) - else + elseif tonumber(script_data.settings.content_revision) <= 122701 then RPC.rpc_chat_message(peer_id, CHANNEL_ID, MESSAGE_SENDER, LOCAL_PLAYER_ID, message, LOCALIZATION_PARAM, IS_SYSTEM_MESSAGE, POP_CHAT, IS_DEV) + else + RPC.rpc_chat_message(peer_id, CHANNEL_ID, MESSAGE_SENDER, LOCAL_PLAYER_ID, message, LOCALIZATION_PARAMETERS, + LOCALIZE, LOCALIZE_PARAMETERS, IS_SYSTEM_MESSAGE, POP_CHAT, IS_DEV) end end diff --git a/vmf/scripts/mods/vmf/modules/core/network.lua b/vmf/scripts/mods/vmf/modules/core/network.lua index aa3fdd2..3971971 100644 --- a/vmf/scripts/mods/vmf/modules/core/network.lua +++ b/vmf/scripts/mods/vmf/modules/core/network.lua @@ -136,9 +136,12 @@ local function rpc_chat_message(member, channel_id, message_sender, message, loc if VT1 then RPC.rpc_chat_message(member, channel_id, message_sender, message, localization_param, is_system_message, pop_chat, is_dev) - else + elseif tonumber(script_data.settings.content_revision) <= 122701 then RPC.rpc_chat_message(member, channel_id, message_sender, 0, message, localization_param, is_system_message, pop_chat, is_dev) + else + RPC.rpc_chat_message(member, channel_id, message_sender, 0, message, {}, false, false, + is_system_message, pop_chat, is_dev) end end