mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
0d051e133f
Thx to Grahame for the inspiration to add it just before logout. This should fix the login without clothings. This will not fix not visible Clothings for others, because it only runs just before logout, but Players can force it be pressing ESC and waiting until this command is fired.
88 lines
2.4 KiB
Plaintext
88 lines
2.4 KiB
Plaintext
/*
|
|
Author: Niklas Wagner - EpochMod.com
|
|
|
|
Contributors: Aaron Clark, Raimonds Virtoss
|
|
|
|
Description:
|
|
TODO: DESC-TBA
|
|
|
|
Licence:
|
|
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
|
|
|
Github:
|
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/scripts/Epoch_onPause.sqf
|
|
*/
|
|
disableSerialization;
|
|
private ["_fieldManual","_btnSave","_btnAbort","_respawnButton"];
|
|
params [["_display",displayNull,[displayNull]]];
|
|
|
|
_fieldManual = _display displayCtrl 122;
|
|
_fieldManual ctrlEnable false;
|
|
_btnSave = _display displayCtrl 103;
|
|
_btnSave ctrlEnable false;
|
|
_btnAbort = _display displayCtrl 104;
|
|
_btnAbort ctrlEnable false;
|
|
_respawnButton = _display displayCtrl 1010;
|
|
_respawnButton ctrlEnable false;
|
|
|
|
//Change to a scheduled environment
|
|
[_btnAbort,_display] spawn {
|
|
disableSerialization;
|
|
params ["_btnAbort","_display"];
|
|
_startTime = diag_tickTime+10;
|
|
waitUntil {
|
|
_time = _startTime - diag_tickTime;
|
|
if (isNull _display || _time <= 0) exitWith {true};
|
|
_btnAbort ctrlSetText format[localize "str_epoch_abort",[_time,"SS.MS"] call BIS_fnc_secondsToString];
|
|
false
|
|
};
|
|
if (!isNull _display) then {
|
|
_btnAbort ctrlSetText localize "str_disp_int_abort";
|
|
_btnAbort ctrlEnable true;
|
|
};
|
|
};
|
|
[_display,_btnAbort,_fieldManual,_btnSave] spawn {
|
|
disableSerialization;
|
|
params ["_display","_btnAbort","_fieldManual","_btnSave"];
|
|
_profilName = _display displayctrl 109;
|
|
_pauseText = _display displayctrl 523;
|
|
_pauseSetText = toUpper(localize "str_a3_cfguigrids_gui_0");
|
|
_fieldManualText = toUpper(localize "str_a3_rscdisplaywelcome_pare_list3_title");
|
|
_btnSaveText = toUpper(localize "str_disp_int_save");
|
|
|
|
waitUntil {
|
|
_fieldManual ctrlShow true;
|
|
_fieldManual ctrlEnable false;
|
|
_fieldManual ctrlSetText _fieldManualText;
|
|
|
|
_btnSave ctrlShow true;
|
|
_btnSave ctrlSetText _btnSaveText;
|
|
|
|
_pauseText ctrlSetText _pauseSetText;
|
|
_profilName ctrlSetText profileName;
|
|
|
|
uiSleep 0.2;
|
|
isNull _display
|
|
};
|
|
};
|
|
[_display] spawn {
|
|
disableSerialization;
|
|
params ["_display"];
|
|
_startTime = diag_tickTime+5;
|
|
waitUntil {
|
|
uiSleep 0.2;
|
|
(isNull _display) || ((_startTime - diag_tickTime) <= 0)
|
|
};
|
|
if (!isNull _display) then {
|
|
player setUnitLoadout (getUnitLoadout player);
|
|
missionnamespace setvariable ["EPOCH_forceUpdateNow",true];
|
|
};
|
|
};
|
|
|
|
// init epoch configurator
|
|
with missionNamespace do {
|
|
_display call EPOCH_InterruptConfig;
|
|
};
|
|
|
|
true
|