Skip to content

Instantly share code, notes, and snippets.

@AgentRev
Created September 19, 2013 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AgentRev/6630271 to your computer and use it in GitHub Desktop.
Save AgentRev/6630271 to your computer and use it in GitHub Desktop.
Abort button notice script
private["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax","_isDead"];
disableSerialization;
waitUntil {
_display = findDisplay 49;
!isNull _display;
};
_btnRespawn = _display displayCtrl 1010;
_btnAbort = _display displayCtrl 104;
_btnRespawn ctrlEnable false;
_btnAbort ctrlEnable false;
_timeOut = 0;
_timeMax = 25;
// if(r_player_dead) exitWith {_btnAbort ctrlEnable true;};
while {!isNull _display} do {
switch true do {
case ({isPlayer _x} count (player nearEntities ["AllVehicles", 6]) > 1) :
{
_btnAbort ctrlEnable false;
_btnRespawn ctrlEnable false;
cutText ["Cannot Abort near another player!", "PLAIN DOWN"];
};
case (_timeOut < _timeMax) :
{
_btnAbort ctrlEnable false;
_btnRespawn ctrlEnable false;
cutText [format ["Remember to SAVE your stats. Go PRONE and use mouse wheel. You can abort in %1",(_timeMax - _timeOut)], "PLAIN DOWN"];
_timeOut = _timeOut + 1;
};
// case (player getVariable["combattimeout", 0] >= time) : { // _btnAbort ctrlEnable false; // cutText ["Cannot Abort while in combat!", "PLAIN DOWN"]; // };
default {
_btnAbort ctrlEnable true;
_btnRespawn ctrlEnable true;
cutText ["", "PLAIN DOWN"];
};
};
sleep 1;
};
cutText ["", "PLAIN DOWN"];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment