Hey you mean when you get unconscious you want to send a Medic Request.
In the setupEVH you need:
[CODE lang="cpp" title="fn_setupEVH.sqf"]["ace_unconscious",
{
params ["_unit", "_isUnconscious"];
if !(local _unit) exitWith {};
if !(_isUnconscious) exitWith {};
call TFAR_fnc_onSwTangentReleased;
call TFAR_fnc_onAdditionalSwTangentReleased;
call TFAR_fnc_onLRTangentReleased;
call TFAR_fnc_onAdditionalLRTangentReleased;
_unit spawn max_callsmanage_fnc_requestMedic
}
] call CBA_fnc_addEventHandler;[/CODE]
in the requestMedic you need:
[CODE lang="cpp" title="fn_requestMedic.sqf"]_time = time + 5;
uiSleep 3;
if !(player getVariable ["ACE_isUnconscious",false]) exitWith {};
if !(alive player) exitWith {};
waitUntil {( _time < time)}; /// Failsafe Wake Up again
if !(player getVariable ["ACE_isUnconscious",false]) exitWith {};
if !(alive player) exitWith {};
_RequestMedics = [
format["Your Unconscious REQUEST MEDIC YES NO QUESTION."],
localize "STR_MedicalRequestEmerg_Title",
localize "STR_Global_Yes",
localize "STR_Global_No"
] call BIS_fnc_guiMessage;
if (_RequestMedics && ((independent countSide playableUnits) > 0)
) exitwith {
["med"] spawn max_callsmanage_fnc_unconsciousMessage;
diag_log "Request Medic";
};
if !(_RequestMedics) exitWith {
diag_log "Med Decilined!";
};
// If no Medic Online
_RequestCops = [
format["Your Unconscious REQUEST POLICE YES NO QUESTION."],
localize "STR_MedicalRequestEmerg_Title",
localize "STR_Global_Yes",
localize "STR_Global_No"
] call BIS_fnc_guiMessage;
if (_RequestCops && ((west countSide playableUnits) > 0)) exitwith {
["cop"] spawn max_callsmanage_fnc_unconsciousMessage;
diag_log "Request Cops";
};
if !(_RequestCops) exitWith {
diag_log "Cop Decilined!";
};
hint "There is No Person who can help you , you need to Die";[/CODE]