From 501d8a0f42e129f55f5cf71bff5f8874b0df63e2 Mon Sep 17 00:00:00 2001 From: Valmo Trindade Date: Fri, 30 Aug 2024 12:59:03 -0300 Subject: [PATCH] added server instance check on main function --- addons/main/functions/fn_init.sqf | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/addons/main/functions/fn_init.sqf b/addons/main/functions/fn_init.sqf index 2b05b50..8a81eb8 100644 --- a/addons/main/functions/fn_init.sqf +++ b/addons/main/functions/fn_init.sqf @@ -22,6 +22,14 @@ if (isServer && _activated) exitWith { _atak_server_instance_token = call armatak_fnc_extract_auth_token; + if (isNull _atak_server_instance_token) then { + private _warning = format ["ARMATAK
%1", "Connected"]; + [[_warning, 2]] call CBA_fnc_notify; + } else { + private _warning = format ["ARMATAK
%1", "Connection Failed"]; + [[_warning, 2]] call CBA_fnc_notify; + }; + if (isMultiplayer) then { [{ [{ @@ -49,7 +57,4 @@ if (isServer && _activated) exitWith { player call armatak_fnc_deleteMarker; }]; }; - - private _warning = format ["ARMATAK
%1", "Connected"]; - [[_warning, 2]] call CBA_fnc_notify; }; \ No newline at end of file