auto_radio_freq.sqf 791 B

123456789101112131415161718
  1. params["_unit"];
  2. _arf_enabled=profileNamespace getVariable ["namenai_use_arf",false];
  3. if(!_arf_enabled) exitWith {
  4. ["A.R.F script not enabled,ask CX-D Namenai 4 halp", "RD501_Main\ui_icons\arf.paa"] call ace_common_fnc_displayTextPicture;
  5. };
  6. //if(!local _unit) exitWith {};
  7. _lr_list=profileNamespace getVariable ["namenai_lr_freq_list",['35.1','35.2','35.3','35.4','35','36','35.5','42','42']];
  8. for [{_i=0}, {_i<9}, {_i=_i+1}] do
  9. {
  10. [(call TFAR_fnc_activeLrRadio) select 0, (call TFAR_fnc_activeLrRadio) select 1, _i] call TFAR_fnc_setLrChannel;
  11. [(call TFAR_fnc_activeLrRadio) select 0, (call TFAR_fnc_activeLrRadio) select 1, _lr_list select _i] call TFAR_fnc_setLrFrequency;
  12. };
  13. ["Frequencies set, enjoy", "RD501_Main\ui_icons\arf.paa"] call ace_common_fnc_displayTextPicture;