1
0

fn_onLRDialogOpen.sqf 748 B

1234567891011121314151617181920
  1. [] spawn {
  2. private ["_radio","_dialog_to_open","_dialog_update"];
  3. sleep 0.1;
  4. if ((alive TFAR_currentUnit) and {call TFAR_fnc_haveLRRadio}) then {
  5. if !(dialog) then {
  6. _radio = (TF_lr_dialog_radio select 0);
  7. _dialog_to_open = ([_radio, "tf_dialog"] call TFAR_fnc_getLrRadioProperty);
  8. _dialog_update = ([_radio, "tf_dialogUpdate"] call TFAR_fnc_getLrRadioProperty);
  9. if (RD501_Radio_Dialog_Selector_Enabled) then {
  10. _dialog_to_open = RD501_Radio_Dialog_Selector_Dialog;
  11. };
  12. createDialog _dialog_to_open;
  13. TFAR_currentUnit playAction "Gear";
  14. call compile _dialog_update;
  15. ["OnRadioOpen", player, [player, TF_lr_dialog_radio, true, _dialog_to_open, true]] call TFAR_fnc_fireEventHandlers;
  16. };
  17. };
  18. };
  19. true