From a0221c68d40af62991f4be5960930dc64ca26296 Mon Sep 17 00:00:00 2001 From: Valmo Trindade Date: Mon, 12 Aug 2024 01:25:15 -0300 Subject: [PATCH] added sendMessage sqf function --- addons/main/functions/api/fn_send_message.sqf | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 addons/main/functions/api/fn_send_message.sqf diff --git a/addons/main/functions/api/fn_send_message.sqf b/addons/main/functions/api/fn_send_message.sqf new file mode 100644 index 0000000..6342d99 --- /dev/null +++ b/addons/main/functions/api/fn_send_message.sqf @@ -0,0 +1,12 @@ +// function name: armatak_fnc_send_message +// function author: Valmo +// function description: Receives a message string and send it to the FTS chat + +params["_server_message"]; + +private _atak_server_instance = missionNamespace getVariable "_atak_server_instance"; +private _atak_server_instance_token = missionNamespace getVariable "_atak_server_instance_token"; + +private _message_payload = [_server_message, _atak_server_instance, _atak_server_instance_token]; + +private _request = "armatak" callExtension ["ManageChat/postChatToAll",_message_payload]; \ No newline at end of file