Skip to content

API: Functions

Dedmen Miller edited this page Sep 19, 2016 · 1 revision
Index of API functions (128 entries)
A  B  C  D  F  G  H  I  P  R  S  T  U  V 
Please note, all functions are appended with a symbol that is not actually part of their names, and is meant only to denote authorship of each particular entry, the following way:

Alpha

TFAR_fnc_activeLrRadio  ɱ
Returns the active LR radio.
Parameters
  • Nothing
Returns
  • ARRAY – active LR radio.
Example
_radio = call TFAR_fnc_activeLRRadio;
TFAR_fnc_activeSwRadio  ɱ
Returns the active SW radio.
Parameters
  • Nothing
Returns
  • STRING – active SW radio.
Example
_radio = call TFAR_fnc_activeLRRadio;
TFAR_fnc_addEventHandler  ɠ
Adds an eventhandler to the passed unit unless the unit is null then fires globally.
Parameters
  1. STRING – custom handler ID.
  2. STRING – event ID.
  3. CODE – code to execute when event is fired.
  4. OBJECT – unit to add the event to; ObjNull to add globally.
Returns
  • Nothing
Example
["MyID", "OnSpeak", {
_unit = _this select 0;
_volume = _this select 1;
hint format ["%1 is speaking %2", name _unit, _volume];
}, player] call TFAR_fnc_addEventHandler;

Bravo

TFAR_fnc_backpackLr  ɱ
Returns the backpack radio (if there is one).
Parameters
  1. OBJECT – unit.
Returns
  • ARRAY – manpack or empty array.
Example
_radio = player call TFAR_fnc_backpackLR;

Charlie

TFAR_fnc_calcTerrainInterception  ɱ
Calculates the terrain interference between the player and the passed unit.
Parameters
  1. OBJECT – unit to calculate terrain interference with.
Returns
  • NUMBER – terrain interference.
Example
_interception = soldier2 call TFAR_fnc_calcTerrainInterception;
TFAR_fnc_canSpeak  ɱ
Tests whether it is possible to speak at the given eye height, and if the unit is within an isolated vehicle.
Parameters
  1. BOOLEAN – whether the unit is isolated and inside a vehicle.
  2. NUMBER – the eye depth.
Returns
  • BOOLEAN – whether it is possible to speak.
Example
_canSpeak = [false, -12] call TFAR_fnc_canSpeak;
TFAR_fnc_canUseDDRadio  ɱ
Checks whether it is possible for the DD radio to be used at the current height and isolated status.
Parameters
  1. NUMBER – depth.
  2. BOOLEAN – isolated and inside.
Returns
  • BOOLEAN
Example
_canUseDD = [-12,true] call TFAR_fnc_canUseDDRadio;
TFAR_fnc_canUseLRRadio  ɱ
Checks whether the LR radio would be able to be used at passed depth.
Parameters
  1. OBJECT – unit.
  2. BOOLEAN – isolated and inside.
  3. BOOLEAN – can speak.
  4. NUMBER – depth.
Returns
  • BOOLEAN
Example
_canUseSW = [player, false, false, 10] call TFAR_fnc_canUseLrRadio;
TFAR_fnc_canUseSWRadio  ɱ
Checks whether the SW radio would be able to be used at passed depth.
Parameters
  1. OBJECT – unit.
  2. BOOLEAN – isolated and inside.
  3. BOOLEAN – can speak.
  4. NUMBER – depth.
Returns
  • BOOLEAN
Example
_canUseSW = [player, false, false, 10] call TFAR_fnc_canUseSwRadio;
TFAR_fnc_copyRadioSettingMenu  ɱ
Returns a submenu for radio settings copying.
Parameters
  • Nothing
Returns
  • ARRAY – CBA UI menu.
Example
Called internally by CBA UI
TFAR_fnc_CopySettings  ɠ
Copies the settings from a radio to another.
Parameters
  1. ARRAY / STRING – source (SW / LR).
  2. ARRAY / STRING – target (SW / LR).
Returns
  • Nothing
Example
// LR - LR
[(call TFAR_fnc_activeLrRadio),[(vehicle player), "driver"]] call TFAR_fnc_CopySettings;
// SW - SW
[(call TFAR_fnc_activeSwRadio),"tf_anprc148jem_20"] call TFAR_fnc_CopySettings;
TFAR_fnc_currentDirection  ɱ
Returns current facing diration of player.
Parameters
  • Nothing
Returns
  • NUMBER – head direction azimuth.
Example
call TFAR_fnc_currentDirection;
TFAR_fnc_currentUnit  ɱ
Return current player unit (player- or remote-controlled by Zeus).
Parameters
  • Nothing
Returns
  • OBJECT – current unit.
Example
call TFAR_fnc_currentUnit;

Delta

TFAR_fnc_defaultPositionCoordinates  ɱ
Prepares the position coordinates of the passed unit.
Parameters
  1. OBJECT – unit.
  2. BOOLEAN – is near player.
Returns
  • Nothing

Foxtrot

TFAR_fnc_fireEventHandlers  ɠ
Fires all event handlers associated with the passed unit.
Parameters
  1. STRING – ID for event.
  2. OBJECT – unit to fire events on.
  3. ANY – parameters.
Returns
  • Nothing
Example
["OnSpeak", player, [player, TF_speak_volume_meters]] call TFAR_fnc_fireEventHandlers;
TFAR_fnc_forceSpectator  ɠ
If the 2nd parameter is true – player is forced into spectator mode (at radio level); false – default behavior.
Parameters
  • ARRAY – settings:
    • 0.OBJECT – player.
    • 1.BOOLEAN – force or not.
Returns
  • Nothing
Example
[player, true] call TFAR_fnc_forceSpectator;

Golf

TFAR_fnc_generateDDFreq  ɱ
Generates frequency for diver radio.
Example
call TFAR_fnc_generateDDFreq;
TFAR_fnc_generateFrequencies  ɠɱ
Generates frequencies based on the passed parameters to be used in radio settings.
Parameters
  1. NUMBER – channels.
  2. NUMBER – MAX freq value.
  3. NUMBER – MIN freq value.
  4. NUMBER – frequency round power.
Returns
  • ARRAY – frequencies for channels.
Example
// LR
_frequencies = [TF_MAX_LR_CHANNELS,TF_MAX_ASIP_FREQ,TF_MIN_ASIP_FREQ,TF_FREQ_ROUND_POWER] call TFAR_fnc_generateFrequencies;
// SW
_sw_frequencies = [TF_MAX_CHANNELS,TF_MAX_SW_FREQ,TF_MIN_SW_FREQ,TF_FREQ_ROUND_POWER] call TFAR_fnc_generateFrequencies;
TFAR_fnc_generateLrSettings  ɠɱ
Generates settings for the LR radio.
Parameters
  1. BOOLEAN – (optional) false to generate settings without generating frequencies.
Returns
  • ARRAY – settings:
    • 0.NUMBER – active channel (CH).
    • 1.NUMBER – volume.
    • 2.ARRAY – CH freqs.
    • 3.NUMBER – stereo (S) setting.
    • 4.STRING – encryption code.
    • 5.NUMBER – ADDL active CH.
    • 6.NUMBER – ADDL active CH (S).
    • 7.NUMBER – speaker mode.
Example
_settings = call TFAR_fnc_generateLrSettings;
TFAR_fnc_generateSwSettings  ɠɱ
Generates settings for the SW radio.
Parameters
  1. BOOLEAN – (optional) false to generate settings without generating frequencies.
Returns
  • ARRAY – settings:
    • 0.NUMBER – active channel (CH).
    • 1.NUMBER – volume.
    • 2.ARRAY – CH freqs.
    • 3.NUMBER – stereo (S) setting.
    • 4.STRING – encryption code.
    • 5.NUMBER – ADDL active CH.
    • 6.NUMBER – ADDL active CH (S).
    • 7.OBJECT – owner.
    • 8.NUMBER – speaker mode.
Example
_settings = call TFAR_fnc_generateSwSettings;
TFAR_fnc_getAdditionalLrChannel  ɱ
Gets the additional channel for the passed radio.
Parameters
  • ARRAY – radio:
    • 0.OBJECT – radio object.
    • 1.STRING – radio ID.
Returns
  • NUMBER – channel.
Example
_channel = (call TFAR_fnc_ActiveLrRadio) call TFAR_fnc_getAdditionalLrChannel;
TFAR_fnc_getAdditionalLrStereo  ɱ
Gets the stereo setting of additional channel of the passed radio.
Parameters
  • ARRAY – radio:
    • 0.OBJECT – radio object.
    • 1.STRING – radio ID.
Returns
  • NUMBER – stereo settings:
    • 0 – both.
    • 1 – left.
    • 2 – right.
Example
_stereo = (call TFAR_fnc_ActiveLrRadio) call TFAR_fnc_getAdditionalLrStereo;
TFAR_fnc_getAdditionalSwChannel  ɱ
Gets the additional channel for the passed radio.
Parameters
  1. STRING – radio class name.
Returns
  • NUMBER – channel.
Example
_channel = (call TFAR_fnc_ActiveSwRadio) call TFAR_fnc_getAdditionalSwChannel;
TFAR_fnc_getAdditionalSwStereo  ɱ
Gets the stereo setting of additional channel of the passed radio.
Parameters
  • ARRAY – radio class name.
Returns
  • NUMBER – stereo settings:
    • 0 – both.
    • 1 – left.
    • 2 – right.
Example
_stereo = (call TFAR_fnc_ActiveSwRadio) call TFAR_fnc_getAdditionalSwStereo;
TFAR_fnc_getChannelFrequency  ɠ
Returns the frequency for the passed channel and radio.
Parameters
  1. OBJECT / STRING – radio.
Returns
  • STRING – frequency.
Example
// LR radio - channel 1
[(call TFAR_fnc_activeLrRadio), 1] call TFAR_fnc_GetChannelFrequency;
// SW radio - channel 1
[(call TFAR_fnc_activeSwRadio), 1] call TFAR_fnc_GetChannelFrequency;
TFAR_fnc_getConfigProperty  ɠɱ
Gets a config property – getNumber / getText. Only works for CfgVehicles.
Parameters
  1. STRING – item class name.
  2. STRING – property.
  3. ANYTHING – (optional) default.
Returns
  • NUMBER / TEXT – result.
Example
[_LRradio, "tf_hasLrRadio", 0] call TFAR_fnc_getConfigProperty;
TFAR_fnc_getCurrentLrStereo  ɱ
Gets the stereo of current channel (special logic for additional) setting of the passed radio.
Parameters
  • ARRAY – radio:
    • 0.OBJECT – radio object.
    • 1.STRING – radio ID.
Returns
  • NUMBER – stereo settings:
    • 0 – both.
    • 1 – left.
    • 2 – right.
Example
_stereo = (call TFAR_fnc_ActiveLrRadio) call TFAR_fnc_getCurrentLrStereo;
TFAR_fnc_getCurrentSwStereo  ɱ
Gets the stereo setting of current channel (special logic for additional) the passed radio.
Parameters
  1. STRING – radio class name.
Returns
  • NUMBER – stereo settings:
    • 0 – both.
    • 1 – left.
    • 2 – right.
Example
_stereo = (call TFAR_fnc_ActiveSwRadio) call TFAR_fnc_getCurrentSwStereo;
TFAR_fnc_getDefaultRadioClasses  ɱ
Returns an array of default radio classes for player.
Parameters
  • Nothing
Returns
  • ARRAY
    • defaultLR
    • defaultPersonal
    • defaultRifleman
    • defaultAirborne
Example
_classes = call TFAR_fnc_getDefaultRadioClasses;
TFAR_fnc_getLrChannel  ɱ
Gets the channel for the passed radio.
Parameters
  • ARRAY – radio:
    • 0.OBJECT – radio object.
    • 1.STRING – radio ID.
Returns
  • NUMBER – channel.
Example
_channel = (call TFAR_fnc_ActiveLrRadio) call TFAR_fnc_getLrChannel;
TFAR_fnc_getLrFrequency  ɠɱ
Gets the frequency for the active channel.
Parameters
  • ARRAY – radio:
    • 0.OBJECT – radio object.
    • 1.STRING – radio ID.
Returns
  • NUMBER – frequency.
Example
_frequency = (call TFAR_fnc_ActiveLrRadio) call TFAR_fnc_getLrFrequency;
TFAR_fnc_getLrRadioCode  ɠɱ
Returns the encryption code for the passed radio.
Parameters
  1. OBJECT – radio.
Returns
  • STRING – encryption code.
Example
(call TFAR_fnc_activeLrRadio) call TFAR_fnc_getLrRadioCode;
TFAR_fnc_getLrRadioProperty  ɠ
Parameters
  1. OBJECT – manpack/vehicle.
  2. STRING – property name.
Returns
  • NUMBER / TEXT – value of property.
Example
[(vehicle player), "TF_hasLRradio"] call TFAR_fnc_getLrRadioProperty;
TFAR_fnc_getLrSettings  ɠɱ
Returns the current settings for the passed radio.
Parameters
  1. OBJECT – radio.
  2. STRING – radio qualifier.
Returns
  • ARRAY – settings.
Example
(call TFAR_fnc_activeLrRadio) call TFAR_fnc_getLrSettings;
TFAR_fnc_getLrSpeakers  ɱ
Gets the speakers setting of the passed radio.
Parameters
  • ARRAY – radio:
    • 0.OBJECT – radio object.
    • 1.STRING – radio ID.
Returns
  • BOOLEAN – speakers or headphones.
Example
_speakers = (call TFAR_fnc_ActiveLrRadio) call TFAR_fnc_getLrSpeakers;
TFAR_fnc_getLrStereo  ɱ
Gets the stereo setting of the passed radio.
Parameters
  • ARRAY – radio:
    • 0.OBJECT – radio object.
    • 1.STRING – radio ID.
Returns
  • NUMBER – stereo settings:
    • 0 – both.
    • 1 – left.
    • 2 – right.
Example
_stereo = (call TFAR_fnc_ActiveLrRadio) call TFAR_fnc_getLrStereo;
TFAR_fnc_getLrVolume  ɱ
Gets the volume of the passed radio.
Parameters
  • ARRAY – radio:
    • 0.OBJECT – radio object.
    • 1.STRING – radio ID.
Returns
  • NUMBER – volume; range: 0,10.
Example
_volume = (call TFAR_fnc_ActiveLrRadio) call TFAR_fnc_getLrVolume;
TFAR_fnc_getRadioOwner  ɠ
Gets the owner of a SW radio.
Parameters
  1. STRING – radio class name.
Returns
  • STRING – UID of owner of radio.
Example
_owner = (call TFAR_fnc_activeSwRadio) call TFAR_fnc_getRadioOwner;
TFAR_fnc_getSideRadio  ɠ
Returns the default radio for the passed side.
Parameters
  1. SIDE – side.
  2. NUMBER – radio type:
    • 0 – LR.
    • 1 – SW.
    • 2 – Rifleman.
Returns
  • STRING / OBJECT – default radio.
Example
_defaultLRRadio = [side player, 0] call TFAR_fnc_getSideRadio;
_defaultSWRadio = [side player, 1] call TFAR_fnc_getSideRadio;
_defaultRiflemanRadio = [side player, 2] call TFAR_fnc_getSideRadio;
TFAR_fnc_getSwChannel  ɱ
Gets the channel for the passed radio.
Parameters
  1. STRING – radio class name.
Returns
  • NUMBER – channel.
Example
_channel = (call TFAR_fnc_ActiveSwRadio) call TFAR_fnc_getSwChannel;
TFAR_fnc_getSwFrequency  ɠɱ
Gets the frequency for the active channel.
Parameters
  • STRING – radio class name.
Returns
  • NUMBER – frequency.
Example
_frequency = (call TFAR_fnc_ActiveSwRadio) call TFAR_fnc_getSwFrequency;
TFAR_fnc_getSwRadioCode  ɠɱ
Returns the encryption code for the passed radio.
Parameters
  1. STRING – radio class name.
Returns
  • STRING – encryption code.
Example
(call TFAR_fnc_activeSwRadio) call TFAR_fnc_getSwRadioCode;
TFAR_fnc_getSwSettings  ɠɱ
Returns the current settings for the passed radio.
Parameters
  1. STRING – radio class name.
Returns
  • ARRAY – settings.
Example
(call TFAR_fnc_activeSwRadio) call TFAR_fnc_getSwSettings;
TFAR_fnc_getSwSpeakers  ɱ
Gets the speakers setting of the passed radio.
Parameters
  1. STRING – radio class name.
Returns
  • BOOLEAN – speakers or headphones.
Example
_stereo = (call TFAR_fnc_ActiveSwRadio) call TFAR_fnc_getSwSpeakers;
TFAR_fnc_getSwStereo  ɱ
Gets the stereo setting of the passed radio.
Parameters
  1. STRING – radio class name.
Returns
  • NUMBER – stereo settings:
    • 0 – both.
    • 1 – left.
    • 2 – right.
Example
_stereo = (call TFAR_fnc_ActiveSwRadio) call TFAR_fnc_getSwStereo;
TFAR_fnc_getSwVolume  ɱ
Gets the volume of the passed radio.
Parameters
  1. STRING – radio class name.
Returns
  • NUMBER – volume; range: 0,10.
Example
_volume = (call TFAR_fnc_ActiveSwRadio) call TFAR_fnc_getSwVolume;
TFAR_fnc_getTeamSpeakChannelName  ɱ
Returns TeamSpeak channel name.
Parameters
  • Nothing
Returns
  • STRING – name of channel.
Example
call TFAR_fnc_getTeamSpeakChannelName;
TFAR_fnc_getTeamSpeakServerName  ɱ
Returns TeamSpeak server name.
Parameters
  • Nothing
Returns
  • STRING – name of server.
Example
call TFAR_fnc_getTeamSpeakServerName;
TFAR_fnc_getTransmittingDistanceMultiplicator  ɱ
Returns multiplicator for sending distance of radio.
Example
call TFAR_fnc_getTransmittingDistanceMultiplicator;
TFAR_fnc_getVehicleSide  ɱ
Returns side of vehicle, based on its model and not who captured it; takes into account tf_side variable.
Parameters
  1. OBJECT – vehicle.
Returns
  • SIDE – side of vehicle.
Example
_vehicleSide = (vehicle player) call TFAR_fnc_getVehicleSide;

Hotel

TFAR_fnc_hasVehicleRadio  ɱ
Checks _this for LR radio presence.
Parameters
  1. OBJECT – vehicle to check.
Returns
  • BOOLEANtrue / false.
Example
_present = (vehicle player) call TFAR_fnc_hasVehicleRadio;
TFAR_fnc_haveDDRadio  ɱ
Checks whether the player has a DD radio.
Parameters
  • Nothing
Returns
  • BOOLEAN
Example
_hasDD = call TFAR_fnc_haveDDRadio;
TFAR_fnc_haveLRRadio  ɱ
Checks whether the player has a LR radio.
Parameters
  • Nothing
Returns
  • BOOLEAN
Example
_hasLR = call TFAR_fnc_haveLRRadio;
TFAR_fnc_haveSWRadio  ɱ
Checks whether the player has a SW radio.
Parameters
  • Nothing
Returns
  • BOOLEAN
Example
_hasSW = call TFAR_fnc_haveSWRadio;
TFAR_fnc_HideHint  ɠ
Removes the hint from the bottom right.
Example
call TFAR_fnc_HideHint;

India

TFAR_fnc_initialiseBaseModule  ɠ
Initialises variables based on module settings.
TFAR_fnc_initialiseEnforceUsageModule  ɠ
Initialises variables based on module settings.
TFAR_fnc_initialiseFreqModule  ɠ
Initialises variables based on module settings.
TFAR_fnc_isForcedCurator  ɱ
Checks whether certain unit is a forced curator.
Parameters
  • OBJECT – unit to check.
Returns
  • BOOLEAN – is unit a forced curator.
Example
player call TFAR_fnc_isForcedCurator;
TFAR_fnc_isPrototypeRadio  ɠ
Checks whether certain radio is a prototype radio.
Parameters
  1. STRING – radio class name.
Returns
  • BOOLEANtrue if prototype, false if actual radio.
Example
if ("tf_148jem" call TFAR_fnc_isPrototypeRadio) then {
hint "Prototype";
};
TFAR_fnc_isRadio  ɠɱ
Checks whether the passed radio is a TFAR radio.
Parameters
  1. STRING – radio class name.
Returns
  • BOOLEAN
Example
_isRadio = "NotARadioClass" call TFAR_fnc_isRadio;
TFAR_fnc_isSameRadio  ɠ
Checks whether the two passed radios have the same prototype radio.
Parameters
  1. STRING – radio class name.
  2. STRING – radio class name.
Returns
  • BOOLEAN – same parent radio.
Example
if([(call TFAR_fnc_activeSwRadio),"tf_fadak"] call TFAR_fnc_isSameRadio) then {
hint "same parent radio";
};
TFAR_fnc_isSpeaking  ɠ
Check whether a unit is speaking.
Parameters
  1. OBJECT – unit.
Returns
  • BOOLEAN – if the unit is speaking.
Example
if (player call TFAR_fnc_isSpeaking) then {
hint "You are speaking";
};
TFAR_fnc_isTeamSpeakPluginEnabled  ɱ
Checks whether TeamSpeak plugin is enabled on client.
Parameters
  • Nothing
Returns
  • BOOLEAN – enabled or not.
Example
call TFAR_fnc_isTeamSpeakPluginEnabled;
TFAR_fnc_isVehicleIsolated  ɱ
Checks whether the vehicle is isolated.
Parameters
  1. OBJECT – the vehicle.
Returns
  • BOOLEAN
Example
_isolated = (vehicle player) call TFAR_fnc_isVehicleIsolated;

Papa

TFAR_fnc_preparePositionCoordinates  ɱ
Prepares the position coordinates of the passed unit.
Parameters
  1. OBJECT – unit.
  2. BOOLEAN – is near player.
  3. STRING – unit name.
Returns
  • BOOLEAN
TFAR_fnc_processGroupFrequencySettings  ɱ
Sets frequency settings for groups.
Example
call TFAR_fnc_processGroupFrequencySettings;
TFAR_fnc_processLRChannelKeys  ɱ
Switches the active LR radio to the passed channel.
Parameters
  1. NUMBER – channel; range: 0,8.
Returns
  • BOOLEAN – the event handled or not.
Example
Called by CBA.
TFAR_fnc_processLRCycleKeys  ɱ
Allows rotating through the list of LR radios with keys.
Parameters
  1. STRING – direction to cycle; values: next / prev.
Returns
  • BOOLEAN – the event handled or not.
Example
Handled via "onKey" event handler of CBA.
TFAR_fnc_processLRStereoKeys  ɱ
Switches the LR stereo setting on the active LR radio.
Parameters
  1. NUMBER – stereo settings:
    • 0 – both.
    • 1 – left.
    • 2 – right.
Returns
  • BOOLEAN – the event handled or not.
Example
Called via "onKey" event handler of CBA.
TFAR_fnc_processPlayerPositions  ɱ
Processes positions of select players on each call and sends them to the plugin.
Example
call TFAR_fnc_processPlayerPositions;
TFAR_fnc_processRespawn  ɠɱ
Handles radio switching — whether a manpack must be added to the player or not.
Example
call TFAR_fnc_processRespawn;
TFAR_fnc_processSWChannelKeys  ɱ
Switches the active SW radio to the passed channel.
Parameters
  1. NUMBER – channel; range: 0,7.
Returns
  • BOOLEAN – the event handled or not.
Example
Called by CBA.
TFAR_fnc_processSWCycleKeys  ɱ
Allows rotating through the list of SW radios with keys.
Parameters
  1. STRING – direction to cycle; values: next / prev.
Returns
  • BOOLEAN – the event handled or not.
Example
Handled via "onKey" event handler of CBA.
TFAR_fnc_processSWStereoKeys  ɱ
Switches the SW stereo setting on the active SW radio.
Parameters
  1. NUMBER – stereo settings:
    • 0 – both.
    • 1 – left.
    • 2 – right.
Returns
  • BOOLEAN – the event handled or not.
Example
Called via "onKey" event handler of CBA.
TFAR_fnc_ProcessTangent  ɠɱ
Called when tangent is released.
Parameters
  1. STRING – hint text.
  2. STRING – request string.
  3. NUMBER – (optional) hint display time.
Returns
  • Nothing
Example
_hintText = format[localize "STR_transmit_end",format ["%1<img size='1.5' image='%2'/>",[_radio select 0, "displayName"] call TFAR_fnc_getLrRadioProperty, getText(configFile >> "CfgVehicles"
>> typeof (_radio select 0) >> "picture")],(_radio call TFAR_fnc_getLrChannel) + 1, call TFAR_fnc_currentLRFrequency];
_request = format["TANGENT_LR   RELEASED    %1%2    %3  %4", call TFAR_fnc_currentLRFrequency, (call TFAR_fnc_activeLrRadio) call TFAR_fnc_getLrRadioCode, ([_radio select 0, "tf_range"]
call TFAR_fnc_getLrRadioProperty) * (call TFAR_fnc_getTransmittingDistanceMultiplicator), [_radio select 0, "tf_subtype"] call TFAR_fnc_getLrRadioProperty];
[_hintText, _request] call TFAR_fnc_ProcessTangent;

Romeo

TFAR_fnc_radioReplaceProcess  ɱ
Replaces player's radios if there are any prototype radios.
Example
[] spawn TFAR_fnc_radioReplaceProcess;
TFAR_fnc_radiosList  ɱ
List of all SW radios on current player.
Parameters
  1. OBJECT – unit.
Returns
  • ARRAY – list of player's SW radios.
Example
_radios = currentUnit call TFAR_fnc_radiosList;
TFAR_fnc_radiosListSorted  ɱ
Sorts the SW radio list alphabetically.
Parameters
  1. OBJECT – unit.
Returns
  • ARRAY – radio list sorted.
Example
_radios = currentUnit call TFAR_fnc_radiosListSorted;
TFAR_fnc_radioToRequestCount  ɠɱ
Searches through all the items assigned to and on the player and checks if it is a prototype radio, then creates an array of all the class names of the prototype radios and returns it.
Parameters
  1. BOOLEAN – regardless of whether the radio is prototype or not, return it as a radio to be replaced.
Returns
  • ARRAY – list of all radio classes to be replaced.
Example
_radios = false call TFAR_fnc_radioToRequestCount;
TFAR_fnc_removeEventHandler  ɠ
Removes an event from unit / global.
Parameters
  1. STRING – custom handler ID.
  2. STRING – event ID.
  3. OBJECT – unit to add the event to; ObjNull to add globally.
Returns
  • Nothing.
Example
["MyID", "OnSpeak", player] call TFAR_fnc_removeEventHandler;
TFAR_fnc_requestRadios  ɠɱ
Checks whether the player needs to have radios converted to "instanced" versions, handles waiting for response from server with radio class names and applying them to the player.
Example
spawn TFAR_fnc_requestRadios;

Sierra

TFAR_fnc_sendFrequencyInfo  ɱ
Notifies the plugin about the radios currently being used by the player and various settings active on the radio.
Example
call TFAR_fnc_sendFrequencyInfo;
TFAR_fnc_sendPlayerInfo  ɱ
Notifies the plugin about a player.
Parameters
  1. OBJECT – unit.
  2. BOOLEAN – is unit close to player.
  3. STRING – unit name.
Returns
  • Nothing.
Example
[player] call TFAR_fnc_sendPlayerInfo;
TFAR_fnc_sendPlayerKilled  ɱ
Notifies the plugin that a unit has been killed.
Parameters
  1. OBJECT – unit that was killed.
Returns
  • Nothing.
Example
player call TFAR_fnc_sendPlayerKilled;
TFAR_fnc_sendVersionInfo  ɱ
Sends information about the current TFAR version.
Example
call TFAR_fnc_sendVersionInfo;
TFAR_fnc_ServerInit  ɠɱ
Initialises the server and the server loop.
Example
call TFAR_fnc_serverInit;
TFAR_fnc_sessionTracker  ɱ
Collects statistical information to help make TFAR better.
Example
call TFAR_fnc_sessionTracker
TFAR_fnc_setActiveLrRadio  ɱ
Sets the active LR radio to the passed radio.
Parameters
  • ARRAY – settings:
    • 0.OBJECT – radio.
    • 1.BOOLEAN – radio ID.
Returns
  • Nothing
Example
TF_lr_dialog_radio call TFAR_fnc_setActiveLrRadio;
TFAR_fnc_setActiveSwRadio  ɱ
Sets the active SW radio.
Parameters
  1. STRING – radio ID.
Returns
  • Nothing
Example
"tf_anprc148jem_1" call TFAR_fnc_setActiveSwRadio;
TFAR_fnc_setAdditionalLrChannel  ɱ
Sets the radio to the passed channel or disables it (if current additional is passed).
Parameters
  1. OBJECT – radio object.
  2. STRING – radio ID.
  3. NUMBER – channel; range: 0,8.
Returns
  • Nothing
Example
[(call TFAR_fnc_activeLrRadio) select 0, (call TFAR_fnc_activeLrRadio) select 1, 4] call TFAR_fnc_setAdditionalLrChannel;
TFAR_fnc_setAdditionalLrStereo  ɱ
Sets the stereo setting for additional channel the passed radio.
Parameters
  1. OBJECT – radio object.
  2. STRING – radio ID.
  3. NUMBER – stereo settings:
    • 0 – both.
    • 1 – left.
    • 2 – right.
Returns
  • Nothing
Example
[(call TFAR_fnc_activeLrRadio) select 0, (call TFAR_fnc_activeLrRadio) select 1, 1] call TFAR_fnc_setAdditionalLrStereo;
TFAR_fnc_setAdditionalSwChannel  ɱ
Sets the additional channel for the passed radio or disables it (if additional channel in arguments).
Parameters
  1. STRING – radio class name.
  2. NUMBER – channel.
Returns
  • Nothing
Example
[(call TFAR_fnc_activeSwRadio), 2] call TFAR_fnc_setAdditionalSwChannel;
TFAR_fnc_setAdditionalSwStereo  ɱ
Sets the stereo setting for additional channel of the SW radio.
Parameters
  1. STRING – radio.
  2. NUMBER – stereo settings:
    • 0 – both.
    • 1 – left.
    • 2 – right.
Returns
  • Nothing
Example
[(call TFAR_fnc_ActiveSWRadio), 2] call TFAR_fnc_setAdditionalSwStereo;
TFAR_fnc_setChannelFrequency  ɠ
Sets the frequency for the channel on the passed radio.
Parameters
  1. OBJECT / STRING – radio.
  2. NUMBER – channel.
  3. STRING – frequency.
Returns
  • Nothing
Example
// LR radio - channel 1
[(call TFAR_fnc_activeLrRadio), 1, "56.2"] call TFAR_fnc_SetChannelFrequency;
// SW radio - channel 1
[(call TFAR_fnc_activeSwRadio), 1, "84.3"] call TFAR_fnc_SetChannelFrequency;
TFAR_fnc_setChannelViaDialog  ɠ
Sets the channel of the current dialog radio.
Parameters
  1. NUMBER – mouse button pressed; range: 0,1.
  2. BOOLEAN – LR radio.
  3. STRING – (optional) update formatting.
Returns
  • Nothing
Example
// LR radio
[_this select 1, true] call TFAR_fnc_setChannelViaDialog;
// SW radio
[_this select 1, false] call TFAR_fnc_setChannelViaDialog;
TFAR_fnc_setLongRangeRadioFrequency  ɱ
Sets the frequency for the active channel on the active LR radio.
Parameters
  1. STRING – frequency.
Returns
  • Nothing
Example
"45.48" call TFAR_fnc_setLongRangeRadioFrequency;
TFAR_fnc_setLrChannel  ɱ
Sets the radio to the passed channel.
Parameters
  1. OBJECT – radio object.
  2. STRING – radio ID.
  3. NUMBER – channel; range: 0,8.
Returns
  • Nothing
Example
[(call TFAR_fnc_activeLrRadio) select 0, (call TFAR_fnc_activeLrRadio) select 1, 4] call TFAR_fnc_setLrChannel;
TFAR_fnc_setLrFrequency  ɱ
Sets the frequency for the active channel.
Parameters
  1. OBJECT – radio object.
  2. STRING – radio ID.
  3. NUMBER – frequency.
Returns
  • Nothing
Example
[(call TFAR_fnc_activeLrRadio) select 0, (call TFAR_fnc_activeLrRadio) select 1, "45.48"] call TFAR_fnc_setLrFrequency;
TFAR_fnc_setLrRadioCode  ɠ
Allows setting of the encryption code for individual radios.
Example
[(call TFAR_fnc_activeLrRadio) select 0, (call TFAR_fnc_activeLrRadio) select 1, "NewEncryptionCode"] call TFAR_fnc_setLrRadioCode;
TFAR_fnc_setLrSettings  ɠɱ
Saves the settings for the passed radio and broadcasts it to all clients and the server.
Parameters
  1. OBJECT – radio object.
  2. STRING – radio ID.
  3. ARRAY – settings, usually acquired via TFAR_fnc_getLrSettings and then changed.
Returns
  • Nothing
Example
_settings = (call TFAR_fnc_activeLrRadio) call TFAR_fnc_getSwSettings;
_settings set [0, 2]; // sets the active channel to 2
[(call TFAR_fnc_activeLrRadio) select 0, (call TFAR_fnc_activeLrRadio) select 1, _settings] call TFAR_fnc_setLrSettings;
TFAR_fnc_setLrSpeakers  ɱ
Configures the setting of speakers for the passed radio.
Parameters
  1. OBJECT – radio object.
  2. STRING – radio ID.
Returns
  • Nothing
Example
[(call TFAR_fnc_activeLrRadio) select 0, (call TFAR_fnc_activeLrRadio) select 1] call TFAR_fnc_setLrSpeakers;
TFAR_fnc_setLrStereo  ɱ
Sets the stereo setting for the passed radio.
Parameters
  1. OBJECT – radio object.
  2. STRING – radio ID.
  3. NUMBER – stereo settings:
    • 0 – both.
    • 1 – left.
    • 2 – right.
Returns
  • Nothing
Example
[(call TFAR_fnc_activeLrRadio) select 0, (call TFAR_fnc_activeLrRadio) select 1, 1] call TFAR_fnc_setLrStereo;
TFAR_fnc_setLrVolume  ɱ
Sets the volume for the passed radio.
Parameters
  1. OBJECT – radio object.
  2. STRING – radio ID.
  3. NUMBER – volume; range: 0,10.
Returns
  • Nothing
Example
[(call TFAR_fnc_activeLrRadio) select 0, (call TFAR_fnc_activeLrRadio) select 1, 5] call TFAR_fnc_setLrVolume;
TFAR_fnc_setPersonalRadioFrequency  ɱ
Sets the frequency for the active SW radio to passed frequency.
Parameters
  1. STRING – frequency.
Returns
  • Nothing
Example
"65.12" call TFAR_fnc_setPersonalRadioFrequency;
TFAR_fnc_setRadioOwner  ɠ
Sets the owner of a SW radio.
Parameters
  1. STRING – radio class name.
  2. STRING – owner UID.
  3. BOOLEAN – local only.
Returns
  • Nothing
Example
[(call TFAR_fnc_activeSwRadio),player] call TFAR_fnc_setRadioOwner;
TFAR_fnc_setSwChannel  ɠ
Sets the channel for the passed radio.
Parameters
  1. STRING – radio class name.
  2. NUMBER – channel.
Returns
  • Nothing
Example
[(call TFAR_fnc_activeSwRadio), 2] call TFAR_fnc_setSwChannel;
TFAR_fnc_setSwFrequency  ɠɱ
Sets the frequency for the currently active channel.
Parameters
  1. STRING – radio class name.
  2. STRING – frequency.
Returns
  • Nothing
Example
[(call TFAR_fnc_activeSwRadio), "76.2"] call TFAR_fnc_setSwFrequency;
TFAR_fnc_setSwRadioCode  ɠ
Allows setting of the encryption code for individual radios.
Parameters
  1. STRING – radio class name.
  2. STRING – encryption code.
Returns
  • Nothing
Example
[call TFAR_fnc_activeSwRadio, "NewEncryptionCode"] call TFAR_fnc_setSwRadioCode;
TFAR_fnc_setSwSettings  ɱ
Saves the settings for the passed radio and broadcasts it to all clients and the server.
Parameters
  1. STRING – radio class name.
  2. ARRAY – settings; usually acquired via TFAR_fnc_getSwSettings and then changed.
  3. BOOLEAN – set local only.
Returns
  • Nothing
Example
_settings = (call TFAR_fnc_activeSwRadio) call TFAR_fnc_getSwSettings;
_settings set [0, 2]; // sets the active channel to 2
[(call TFAR_fnc_activeSwRadio), _settings] call TFAR_fnc_setSwSettings;
TFAR_fnc_setSwSpeakers  ɱ
Sets the speakers setting for the SW radio.
Parameters
  1. STRING – radio.
Returns
  • Nothing
Example
[call TFAR_fnc_ActiveSWRadio] call TFAR_fnc_setSwSpeakers;
TFAR_fnc_setSwStereo  ɱ
Sets the stereo setting for the SW radio.
Parameters
  1. OBJECT – radio object.
  2. STRING – radio ID.
  3. NUMBER – stereo settings:
    • 0 – both.
    • 1 – left.
    • 2 – right.
Returns
  • Nothing
Example
[(call TFAR_fnc_ActiveSWRadio), 2] call TFAR_fnc_setSwStereo;
TFAR_fnc_setSwVolume  ɱ
Sets the volume for the SW radio.
Parameters
  1. STRING – radio.
  2. NUMBER – volume; range: 0,10.
Returns
  • Nothing
Example
[(call TFAR_fnc_ActiveSWRadio), 10] call TFAR_fnc_setSwVolume;
TFAR_fnc_setVoiceVolume  ɱ
Sets the volume for the player's voice in game.
Parameters
  1. NUMBER – volume; range: 0,TF_max_voice_volume.
Returns
  • Nothing
Example
30 call TFAR_fnc_setVoiceVolume;
TFAR_fnc_setVolumeViaDialog  ɠ
Sets the volume of the current dialog radio.
Parameters
  1. NUMBER – mouse button pressed; range: 0,1.
  2. BOOLEAN – LR radio.
Returns
  • Nothing
Example
// LR radio
[_this select 1, true] call TFAR_fnc_setVolumeViaDialog;
// SW radio
[_this select 1, false] call TFAR_fnc_setVolumeViaDialog;
TFAR_fnc_ShowHint  ɠ
Displays a hint at the bottom right of the screen.
Parameters
  1. STRING – text to display.
  2. NUMBER – time to display; -1 for infinite.
Returns
  • Nothing
Example
["Hello", 3] call TFAR_fnc_ShowHint;
["Hello", -1] call TFAR_fnc_ShowHint;
TFAR_fnc_ShowRadioInfo  ɠ
Displays a hint at the bottom right of the screen.
Parameters
  1. OBJECT / STRING – radio.
  2. BOOLEAN – is LR radio.
Returns
  • Nothing
Example
// LR radio
[(call TFAR_fnc_activeLrRadio), true] call TFAR_fnc_ShowRadioInfo;
// SW radio
[(call TFAR_fnc_activeSwRadio), false] call TFAR_fnc_ShowRadioInfo;
TFAR_fnc_showRadioSpeakers  ɠɱ
Parameters
  1. OBJECT / STRING – radio.
  2. BOOLEAN – (optional) DD radio.
Returns
  • Nothing
Example
// LR radio
[(call TFAR_fnc_activeLrRadio)] call TFAR_fnc_ShowRadioSpeakers;
// SW radio
[(call TFAR_fnc_activeSwRadio)] call TFAR_fnc_ShowRadioSpeakers;
// DD radio
["", true] call TFAR_fnc_ShowRadioSpeakers;
TFAR_fnc_ShowRadioVolume  ɠ
Parameters
  1. OBJECT / STRING – radio.
  2. BOOLEAN – (optional) DD radio.
Returns
  • Nothing
Example
// LR radio
[(call TFAR_fnc_activeLrRadio)] call TFAR_fnc_ShowRadioVolume;
// SW radio
[(call TFAR_fnc_activeSwRadio)] call TFAR_fnc_ShowRadioVolume;
// DD radio
["", true] call TFAR_fnc_ShowRadioVolume;
TFAR_fnc_swRadioMenu  ɠɱ
Returns a list of SW radios if more than one is on the player.
Parameters
  • Nothing
Returns
  • ARRAY
Example
Called internally by CBA UI
TFAR_fnc_swRadioSubMenu  ɠɱ
Returns a sub menu for a particular radio.
Parameters
  • Nothing
Returns
  • ARRAY – CBA UI menu.
Example
Called internally by CBA UI

Tango

TFAR_fnc_TaskForceArrowheadRadioInit  ɠɱ
Initialises TFAR, server and client.
Example
Called by Arma via functions library.

Uniform

TFAR_fnc_updateDDDialog  ɱ
Updates the DD dialog to the channel and depth if switched.
Example
call TFAR_fnc_updateDDDialog;
TFAR_fnc_updateLRDialogToChannel  ɠɱ
Updates the LR dialog to the channel if switched.
Parameters
  1. STRING – (optional) format to display channel with; requires %1.
Returns
  • Nothing
Example
// No custom format.
call TFAR_fnc_updateLRDialogToChannel;
// Custom format
["CH: %1"] call TFAR_fnc_updateLRDialogToChannel;
TFAR_fnc_updateSWDialogToChannel  ɠɱ
Updates the SW dialog to the channel if switched.
Parameters
  1. STRING – (optional) format to display channel with; requires %1.
Returns
  • Nothing
Example
// No custom format.
call TFAR_fnc_updateSWDialogToChannel;
// Custom format
["CH: %1"] call TFAR_fnc_updateSWDialogToChannel;

Victor

TFAR_fnc_vehicleId  ɱ
Returns a string with information about the player vehicle, used at the plugin side.
Parameters
  1. OBJECT – the unit to check.
Returns
  • STRING – NetworkID, turned out.
Example
_vehicleID = player call TFAR_fnc_vehicleID;
TFAR_fnc_vehicleIsIsolatedAndInside  ɱ
Checks whether a unit is in an isolated vehicle and not turned out.
Parameters
  1. OBJECT – the unit to check.
Returns
  • BOOLEANtrue if isolated and not turned out, false if turned out or vehicle is not isolated.
Example
_isolated = player call TFAR_fnc_vehicleIsIsolatedAndInside;
TFAR_fnc_vehicleLr  ɱ
Gets the LR radio of the vehicle and the settings for it depending on the player's position within the vehicle.
Parameters
  1. OBJECT – unit.
Returns
  • ARRAY
    • 0.OBJECT – vehicle.
    • 1.STRING – radio settings ID.
Example
_radio = player call TFAR_fnc_VehicleLR;
Clone this wiki locally