bumyplum 10 Posted November 28, 2018 Is there a way to disable a players abort button whilst the player is dead then activate it again once they're alive? Share this post Link to post Share on other sites
Mr H. 402 Posted November 28, 2018 //in your //description.ext onPauseScript = "script.sqf"; //In //script.sqf disableSerialization; if (!alive player) then {((findDisplay 49) displayctrl 104) ctrlShow false;}; Might work (untested) 2 Share this post Link to post Share on other sites
HazJ 1289 Posted November 28, 2018 Another method is keyDown EH. @Mr H.'s method makes sense and is easier. Share this post Link to post Share on other sites
bumyplum 10 Posted November 29, 2018 15 hours ago, HazJ said: Another method is keyDown EH. @Mr H.'s method makes sense and is easier. I'm wanting it to be executed through a button ingame Share this post Link to post Share on other sites
Mr H. 402 Posted November 29, 2018 What do you mean? Share this post Link to post Share on other sites
bumyplum 10 Posted November 29, 2018 Something i could put into a debug console Share this post Link to post Share on other sites
Mr H. 402 Posted November 29, 2018 You mean as an option you can toggle on and off? It's doable but takes more work. Share this post Link to post Share on other sites
bumyplum 10 Posted November 29, 2018 Yeah, Thats what i'm looking for Share this post Link to post Share on other sites
Mr H. 402 Posted November 30, 2018 you can try that it should add a button to toggle it on and off at the bottom of your pause screen if you are a logged in admin. EDIT: Tested at home,works fine, you'll have to resize reposition the button though. //in your //description.ext onPauseScript = "script.sqf"; //In //script.sqf if (serverCommandAvailable "#kick") then { with uiNamespace do { _ctrl = findDisplay 49 ctrlCreate ["RscButton", -1]; _ctrl ctrlSetPosition [0.917656 * safezoneW + safezoneX,0.94 * safezoneH + safezoneY,0.0773437 * safezoneW,0.044 * safezoneH]; _ctrl ctrlSetText "Disable abort for dead players"; _ctrl ctrlCommit 0; _ctrl ctrlAddEventHandler ["ButtonDown", { _status = missionNamespace getVariable ["TAG_abortIsAllowed",true]; if (_status) then {missionNamespace setVariable ["TAG_abortIsAllowed",false,true];systemChat "abort disabled"} else {missionNamespace setVariable ["TAG_abortIsAllowed",true,true]; systemchat "abort enabled"}; }]; }; }; _status = missionNamespace getVariable ["TAG_abortIsAllowed",true]; if (_status) exitWith {}; disableSerialization; if (!alive player) then {((findDisplay 49) displayctrl 104) ctrlShow false;}; 2 Share this post Link to post Share on other sites
FenixDK 0 Posted November 2, 2021 If for some reason, someone will need to disable (by default) abort button while the player is ace unconscious, you need to replace the last line: if (!alive player) then {((findDisplay 49) displayctrl 104) ctrlShow false;}; with this: if (player getVariable "ACE_isUnconscious" isEqualTo true) then {((findDisplay 49) displayctrl 104) ctrlShow false;}; I needed to do it for punishing players who are abusing the lack of saving ace unconscious players by GRAD Persistence Share this post Link to post Share on other sites