From 68d4c9bbd80ed2e6528244569c79676b87295bd1 Mon Sep 17 00:00:00 2001 From: hybrid Date: Thu, 11 Jun 2026 19:54:45 +0300 Subject: init --- Common/Functions/Common_GetAIDigit.sqf | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Common/Functions/Common_GetAIDigit.sqf (limited to 'Common/Functions/Common_GetAIDigit.sqf') 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 -- cgit v1.3.1