Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //START: TFR Settings (PabstMirror) [2014/04/29] [TFR 0.9.0 Update]
- tf_no_auto_long_range_radio = true;
- tf_same_sw_frequencies_for_side = true;
- tf_same_lr_frequencies_for_side = true;
- tf_freq_west = [0 ,7, ["31","32","33","34","35","36","37","38","39"],0, nil, -1, 0];
- tf_freq_west_lr = [3 ,7, ["31","32","33","34","35","36","37","38","39"],0, nil, -1, 0];
- tf_freq_east = [0 ,7, ["31","32","33","34","35","36","37","38","39"],0, nil, -1, 0];
- tf_freq_east_lr = [3 ,7, ["31","32","33","34","35","36","37","38","39"],0, nil, -1, 0];
- tf_freq_guer = [0 ,7, ["31","32","33","34","35","36","37","38","39"],0, nil, -1, 0];
- tf_freq_guer_lr = [3 ,7, ["31","32","33","34","35","36","37","38","39"],0, nil, -1, 0];
- #define SIDE_ARRAY ["GrpNATO", "GrpCSAT", "GrpAAF", "GrpFIA"]
- #define CHANNELS_ARRAYS [["A1", "A2"], ["B1", "B2"], ["C1", "C2"], ["CO", "DC"], ["TH1", "TH", "TH3", "TH4", "AH1", "AH2"], ["IFV1", "IFV2", "IFV3", "IFV4", "IFV5", "IFV6", "TNK1"]]
- [] spawn {
- if (isDedicated) exitWith {};
- waitUntil {player == player};
- _groupFreqIndex = -1;//Figure out what channel the player's group uses
- {
- _theSide = _x;
- {
- _theGroupArrayIndex = _forEachIndex;
- {
- if ((group player) == (missionNameSpace getVariable [(format ["%1_%2", _theSide, _x]), grpNull])) then {
- _groupFreqIndex = _theGroupArrayIndex;
- };
- } forEach _x;
- } forEach CHANNELS_ARRAYS;
- if (_groupFreqIndex != -1) exitWith {};
- } forEach SIDE_ARRAY;
- if (_groupFreqIndex == -1) then {
- systemChat format ["I have no idea what group you are in"];
- _groupFreqIndex = 0;
- };
- waitUntil {
- sleep 1;
- _swRadioList = [] call TFAR_fnc_radiosListSorted;
- (!isNil "_swRadioList") && {(count _swRadioList) > 0}
- };
- sleep 1;
- _swRadioList = [] call TFAR_fnc_radiosListSorted;
- {
- if ((_forEachIndex == 0) || (_forEachIndex < ((count _swRadioList) - 1))) then { //First Or No Last)
- [_x, _groupFreqIndex] call TFAR_fnc_setSwChannel;
- // if (((count _swRadioList) == 1) || (_forEachIndex != 0)) then {
- systemChat format ["SR Radio [%1] is set to [CH %2]", _x, (_groupFreqIndex + 1)];
- // } else {
- // systemChat format ["SR Radio [%1] is set to [CH %2] and [CH 4]", _x, (_groupFreqIndex + 1)];
- // [_x, 3] call TFAR_fnc_setAdditionalSwChannel;
- // };
- } else { //Last radio, when you have more than 1, is set to command.
- [_x, 3] call TFAR_fnc_setSwChannel;
- systemChat format ["Last SR Radio [%1] is set to Command [CH 4]", _x];
- };
- } forEach _swRadioList;
- if (player getVariable ["shouldHaveRadioBackpack", false]) then { //this is all because TFR fucks up when you have a backpack at mission start, won't need if it gets patched out
- systemChat format ["Setting Up Long Range Radio Backpack [Channel 4]"];
- _backpackItems = backpackItems player; //backup items
- removeBackpack player;
- switch ((player call BIS_fnc_objectSide)) do {
- case (west): {player addBackpack "tf_rt1523g";};
- case (east): {player addBackpack "tf_mr3000";};
- default {player addBackpack "tf_anprc155";};
- };
- {player addItemToBackpack _x; } forEach _backpackItems; //add old bp items to new radio bp
- };
- systemChat "-Radio Setup Complete-";
- };
- //END: TFR Settings (PabstMirror)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement