Untitled
raw download clone
SQL
views 57
,
size 3173 b
if (!hasinterface) exitwith {};
waitUntil{!isNull player};

earplugs = {_this addAction ["<t size='1' color='#FFFF00'>Earplugs On</t>",{hint "Digital Earplugs ON"; dig_earplugs = true},"",-6,false,false,"","isNil 'dig_earplugs'"];_this addAction ["<t size='1' color='#FF0000'>Earplugs Off</t>",{hint "Digital Earplugs OFF";dig_earplugs = nil},"",-6,false,false,"","!isNil 'dig_earplugs'"]};
player call earplugs;

if (dig_earplugs) then {
  earplugs_firednear = {_this addAction ["<t size='1' color='#FFFF00'>Earplugs FiredNear On</t>",{hint "Digital Earplugs for Fired ON"; dig_earplugs_firednear = true},"",-6,false,false,"","isNil 'dig_earplugs_firednear'"];_this addAction ["<t size='1' color='#FF0000'>Earplugs FiredNear Off</t>",{hint "Digital Earplugs for FiredNear OFF";dig_earplugs_firednear = nil},"",-6,false,false,"","!isNil 'dig_earplugs_firednear'"]};
  player call earplugs_firednear;
  earplugs_vehicle = {_this addAction ["<t size='1' color='#FFFF00'>Earplugs Vehicle On</t>",{hint "Digital Earplugs for Vehicle ON"; dig_earplugs_vehicle = true},"",-6,false,false,"","isNil 'dig_earplugs_vehicle'"];_this addAction ["<t size='1' color='#FF0000'>Earplugs Vehicle Off</t>",{hint "Digital Earplugs for Vehicle OFF";dig_earplugs_vehicle = nil},"",-6,false,false,"","!isNil 'dig_earplugs_vehicle'"]};
  player call earplugs_vehicle;
if (vehicle player) then {
    earplugs_acre = {_this addAction ["<t size='1' color='#FFFF00'>Earplugs ARCE On</t>",{hint "Digital Earplugs for ARCE ON"; dig_earplugs_acre = true},"",-6,false,false,"","isNil 'dig_earplugs_vehicle'"];_this addAction ["<t size='1' color='#FF0000'>Earplugs ARCE Off</t>",{hint "Digital Earplugs for ARCE OFF";dig_earplugs_acre = nil},"",-6,false,false,"","!isNil 'dig_earplugs_arce'"]};
    player call earplugs_acre;
} else {
    earplugs_tfar = {_this addAction ["<t size='1' color='#FFFF00'>Earplugs TFAR On</t>",{hint "Digital Earplugs for TFAR ON"; dig_earplugs_tfar = true},"",-6,false,false,"","isNil 'dig_earplugs_vehicle'"];_this addAction ["<t size='1' color='#FF0000'>Earplugs TFAR Off</t>",{hint "Digital Earplugs for TFAR OFF";dig_earplugs_tfar = nil},"",-6,false,false,"","!isNil 'dig_earplugs_tfar'"]};
    player call earplugs_tfar;
};
  };

// firedNear action
if (dig_earplugs_firednear) then {
player addEventHandler ["firedNear",{if ((_this select 2) < 30 &&  soundVolume > 0.3) then {digisfireNear = true} else {digisfireNear = false}}];
};

// in vehicle actionName
if (dig_earplugs_vehicle) then {
  player addEventHandler ["Engine", {if ((_this select 0) == vehicle player && (_this select 1) == true && soundVolume > 0.3) then {
    digisvehicle = true
  } else {
    digisvehicle = false
  }}];
};

// ACRE2
if (dig_earplugs_acre) then {
digisBroabcasting = [player] call acre_api_fnc_isBroadcasting;  	//bool
};
// TFAR
if (dig_earplugs_tfar) then {
_Earplugs_radio_LR = [player] call TFAR_fnc_activeLrRadio; 		//array
_Earplugs_radio_SW = [player] call TFAR_fnc_activeSwRadio; 		//string
};

//Earplugs
if (digisfireNear || digisvehicle || digisBroabcasting) then {
  0.5 fadeSound 0.29;
} else {
  2 fadeSound 1;
};
close fullscreen
Login or Register to edit or fork this paste. It's free.