From 3533c3aa9393fc6350178b196c813dc636ec9cf6 Mon Sep 17 00:00:00 2001 From: hybrid Date: Thu, 11 Jun 2026 19:57:23 +0300 Subject: init --- Common/Functions/Common_GetGroupFromConfig.sqf | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Common/Functions/Common_GetGroupFromConfig.sqf (limited to 'Common/Functions/Common_GetGroupFromConfig.sqf') diff --git a/Common/Functions/Common_GetGroupFromConfig.sqf b/Common/Functions/Common_GetGroupFromConfig.sqf new file mode 100644 index 0000000..5427057 --- /dev/null +++ b/Common/Functions/Common_GetGroupFromConfig.sqf @@ -0,0 +1,23 @@ +Private ['_config','_faction','_group','_kind','_side','_type']; +_side = _this select 0; +_faction = _this select 1; +_kind = _this select 2; +_type = _this select 3; + +_config = configFile >> "CfgGroups" >> _side >> _faction >> _kind >> _type; +_group = []; + +if (isClass _config) then { + for "_j" from 0 to ((count _config) - 1) do { + private ["_mclass"]; + _mclass = _config select _j; + + if (isClass (_mclass)) then { + _group = _group + [getText(_mclass >> "vehicle")]; + }; + }; +} else { + diag_log Format ["[WFBE (ERROR)][frameno:%1 | ticktime:%2] Common_GetGroupFromConfig: Entry (configFile >> 'CfgGroups' >> '%3' >> '%4' >> '%5' >> '%6') is not a valid group config.",diag_frameno,diag_tickTime,_side,_faction,_kind,_type]; +}; + +_group \ No newline at end of file -- cgit v1.3.1