diff options
| author | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:55:04 +0300 |
|---|---|---|
| committer | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:55:04 +0300 |
| commit | b06990293397d4b6d0374097f09d1cc5679216e3 (patch) | |
| tree | 5719922562e317a8083250c178f24376b6692569 /Common/Functions/Common_GetGroupFromConfig.sqf | |
| download | a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.tar.gz a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.tar.bz2 a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.zip | |
init
Diffstat (limited to 'Common/Functions/Common_GetGroupFromConfig.sqf')
| -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 |
