diff options
| author | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:57:23 +0300 |
|---|---|---|
| committer | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:57:23 +0300 |
| commit | 3533c3aa9393fc6350178b196c813dc636ec9cf6 (patch) | |
| tree | 2f96a879c3935dea18e73410926b03c7eef1a751 /Common/Functions/Common_GetGroupFromConfig.sqf | |
| download | a2wf_isladuala-3533c3aa9393fc6350178b196c813dc636ec9cf6.tar.gz a2wf_isladuala-3533c3aa9393fc6350178b196c813dc636ec9cf6.tar.bz2 a2wf_isladuala-3533c3aa9393fc6350178b196c813dc636ec9cf6.zip | |
init
Diffstat (limited to '')
| -rw-r--r-- | Common/Functions/Common_GetGroupFromConfig.sqf | 23 |
1 files changed, 23 insertions, 0 deletions
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 |
