Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (FAR_killed) then
- {
- [_unit] spawn life_fnc_setUnconscious ;
- [FAR_deadGear] spawn life_fnc_loadDeadGear;
- _unit setPosATL (getPosATL life_corpse);
- [] spawn life_fnc_updateTexture;
- createDialog "DeathScreen";
- (findDisplay 7300) displaySetEventHandler ["KeyDown","if((_this select 1) == 1) then {true}"]; //Block the ESC menu
- //Create a thread for something?
- _unit spawn
- {
- private["_maxTime","_RespawnBtn","_Timer"];
- disableSerialization;
- _RespawnBtn = ((findDisplay 7300) displayCtrl 7302);
- _Timer = ((findDisplay 7300) displayCtrl 7301);
- _numMed = Resistance countSide playableUnits;
- if (_numMed <= 0) then
- {
- _maxTime = time + 60;
- }
- else
- {
- _maxTime = time + (life_respawn_timer * 60);
- };
- _RespawnBtn ctrlEnable false;
- waitUntil {_Timer ctrlSetText format["Respawn Available in: %1",[(_maxTime - time),"MM:SS.MS"] call BIS_fnc_secondsToString];
- round(_maxTime - time) <= 0 || isNull _this || Life_request_timer};
- if (Life_request_timer) then {
- _maxTime = time + (life_respawn_timer * 150);
- waitUntil {_Timer ctrlSetText format["Respawn Available in: %1",[(_maxTime - time),"MM:SS.MS"] call BIS_fnc_secondsToString];
- round(_maxTime - time) <= 0 || isNull _this};
- };
- Life_request_timer = false; //resets increased respawn timer
- _RespawnBtn ctrlEnable true;
- _Timer ctrlSetText "Puoi respawnare";
- };
- [] spawn life_fnc_deathScreen;
- }else{
- hideBody _corpse;
- titleText["","BLACK FADED"];
- titleFadeOut 9999999999;
- [] call life_fnc_spawnMenu;
- waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done.
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement