mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-14 05:43:28 +00:00
ADded handling for multiplayer or singleplayer sessions on init function
This commit is contained in:
@@ -18,17 +18,29 @@ if (_activated) exitWith {
|
|||||||
missionNamespace setVariable ["_atak_server_instance", _atak_fts_fulladdress];
|
missionNamespace setVariable ["_atak_server_instance", _atak_fts_fulladdress];
|
||||||
missionNamespace setVariable ["_atak_server_instance_token", _atak_fts_bearer_token];
|
missionNamespace setVariable ["_atak_server_instance_token", _atak_fts_bearer_token];
|
||||||
|
|
||||||
|
if (isMultiplayer) then {
|
||||||
{
|
{
|
||||||
[{
|
[{
|
||||||
_uid = _x getVariable "_atak_uid";
|
_uid = _x getVariable "_atak_uid";
|
||||||
|
|
||||||
if (isNull _uid) then {
|
if (_uid == "") then {
|
||||||
_x call armatak_fnc_postGeoObject;
|
_x call armatak_fnc_postGeoObject;
|
||||||
} else {
|
} else {
|
||||||
_x call armatak_fnc_putGeoObject;
|
_x call armatak_fnc_putGeoObject;
|
||||||
};
|
};
|
||||||
}, 2, []] call CBA_fnc_addPerFrameHandler;
|
}, 2, []] call CBA_fnc_addPerFrameHandler;
|
||||||
} forEach playableUnits;
|
} forEach playableUnits;
|
||||||
|
} else {
|
||||||
|
[{
|
||||||
|
_uid = player getVariable "_atak_uid";
|
||||||
|
|
||||||
|
if (_uid == "") then {
|
||||||
|
player call armatak_fnc_postGeoObject;
|
||||||
|
} else {
|
||||||
|
player call armatak_fnc_putGeoObject;
|
||||||
|
};
|
||||||
|
}, 2, []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
}
|
||||||
|
|
||||||
private _warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Connected!"];
|
private _warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Connected!"];
|
||||||
[[_warning, 1.5]] call CBA_fnc_notify;
|
[[_warning, 1.5]] call CBA_fnc_notify;
|
||||||
|
|||||||
Reference in New Issue
Block a user