fn_isRadio

This commit is contained in:
Wyqer 2019-12-07 22:04:19 +01:00
parent 73de07c32c
commit bb38079cec
No known key found for this signature in database
GPG Key ID: D7E2F8BD7F1E48FA
1 changed files with 9 additions and 7 deletions

View File

@ -2,29 +2,31 @@
File: fn_isRadio.sqf
Author: Zharf - https://github.com/zharf
Date: 2019-07-07
Last Update: 2019-12-03
Last Update: 2019-12-07
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Returns whether the provided item is a radio or not.
Returns whether the classname is a TFAR/ACRE radio or not.
Parameter(s):
_item - Description [STRING, defaults to ""]
_class - Description [STRING, defaults to ""]
Returns:
Item is a radio [BOOL]
*/
// TODO
params [
["_item", "", [""]]
["_class", "", [""]]
];
if (_class isEqualTo "") exitWith {["Empty string given"] call BIS_fnc_error; false};
if ((isClass (configFile >> "CfgPatches" >> "tfar_core")) || (isClass (configFile >> "CfgPatches" >> "task_force_radio"))) exitWith {
_item call TFAR_fnc_isRadio
[_class] call TFAR_fnc_isRadio
};
if (isClass (configFile >> "CfgPatches" >> "acre_api")) exitWith {
[_item] call acre_api_fnc_isRadio
[_class] call acre_api_fnc_isRadio
};
false