diff --git a/addons/main/functions/api/fn_stop_tcp_socket.sqf b/addons/main/functions/api/fn_stop_tcp_socket.sqf new file mode 100644 index 0000000..e689712 --- /dev/null +++ b/addons/main/functions/api/fn_stop_tcp_socket.sqf @@ -0,0 +1,10 @@ +_armatak_tcp_socket_is_running = missionNamespace getVariable "_armatak_tcp_socket_is_running"; + +if (_armatak_tcp_socket_is_running) then { + missionNamespace setVariable ["_armatak_tcp_socket_is_running", false]; + + "armatak" callExtension ["tcp_socket:stop", []]; +} else { + _warning = format ["ARMATAK
%1", "There is no TCP Socket running to be stopped"]; + [[_warning, 1.5]] call CBA_fnc_notify; +}; \ No newline at end of file