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_GetAIDigit.sqf | |
| download | a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.tar.gz a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.tar.bz2 a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.zip | |
init
Diffstat (limited to 'Common/Functions/Common_GetAIDigit.sqf')
| -rw-r--r-- | Common/Functions/Common_GetAIDigit.sqf | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Common/Functions/Common_GetAIDigit.sqf b/Common/Functions/Common_GetAIDigit.sqf new file mode 100644 index 0000000..935b372 --- /dev/null +++ b/Common/Functions/Common_GetAIDigit.sqf @@ -0,0 +1,21 @@ +Private ["_i","_split","_unit","_yield"];
+
+_unit = _this;
+
+if (_unit == leader (group _unit)) exitWith {"Leader"};
+
+_split = toArray(str _unit);
+
+_find = _split find 58;
+_yield = [];
+
+if (_find != -1) then {
+ for '_i' from (_find+1) to count(_split)-1 do {
+ if ((_split select _i) == 65 || (_split select _i) == 32) exitWith {};
+ _yield = _yield + [_split select _i];
+ };
+};
+
+if (count _yield == 0) exitWith {"0"};
+
+toString(_yield)
\ No newline at end of file |
