mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 22: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_token", _atak_fts_bearer_token];
|
||||
|
||||
{
|
||||
[{
|
||||
_uid = _x getVariable "_atak_uid";
|
||||
if (isMultiplayer) then {
|
||||
{
|
||||
[{
|
||||
_uid = _x getVariable "_atak_uid";
|
||||
|
||||
if (isNull _uid) then {
|
||||
_x call armatak_fnc_postGeoObject;
|
||||
if (_uid == "") then {
|
||||
_x call armatak_fnc_postGeoObject;
|
||||
} else {
|
||||
_x call armatak_fnc_putGeoObject;
|
||||
};
|
||||
}, 2, []] call CBA_fnc_addPerFrameHandler;
|
||||
} forEach playableUnits;
|
||||
} else {
|
||||
[{
|
||||
_uid = player getVariable "_atak_uid";
|
||||
|
||||
if (_uid == "") then {
|
||||
player call armatak_fnc_postGeoObject;
|
||||
} else {
|
||||
_x call armatak_fnc_putGeoObject;
|
||||
player call armatak_fnc_putGeoObject;
|
||||
};
|
||||
}, 2, []] call CBA_fnc_addPerFrameHandler;
|
||||
} forEach playableUnits;
|
||||
}
|
||||
|
||||
private _warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Connected!"];
|
||||
[[_warning, 1.5]] call CBA_fnc_notify;
|
||||
|
||||
Reference in New Issue
Block a user