```
case "buttonRespawn": {
_display = ctrlparent (_params select 0);
_respawn = [localize "STR_A3_RSCDISPLAYMPINTERRUPT_RESPAWNPROMPT",nil,localize "STR_A3_RSCDISPLAYCAMPAIGNLOBBY_RESPAWN",true,_display,true] call bis_fnc_guiMessage;
if (_respawn) then {
player setVariable ["playerAliveOnRespawn",alive player]; // Just this line needed
if (alive player) then
{
missionNamespace setVariable ["RscDisplayMPInterrupt_respawnTime", time];
player setdamage 1;
};
if (!isNil {missionNamespace getVariable "BIS_RscRespawnControls_escHandler"}) then
{
(uiNamespace getVariable "BIS_RscRespawnControlsMap_ctrlControlsGroup") ctrlSetFade 0;
(uiNamespace getVariable "BIS_RscRespawnControlsMap_ctrlControlsGroup") ctrlCommit 0;
};
_display closedisplay 2;
};
};
```