diff options
| author | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:54:45 +0300 |
|---|---|---|
| committer | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:54:45 +0300 |
| commit | 68d4c9bbd80ed2e6528244569c79676b87295bd1 (patch) | |
| tree | 6efd42fbf6f1281874ae0ff1f8816b01fe0c7153 /Common/Functions/Common_GetAIDigit.sqf | |
| download | a2wf_takistan-68d4c9bbd80ed2e6528244569c79676b87295bd1.tar.gz a2wf_takistan-68d4c9bbd80ed2e6528244569c79676b87295bd1.tar.bz2 a2wf_takistan-68d4c9bbd80ed2e6528244569c79676b87295bd1.zip | |
init
Diffstat (limited to '')
| -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 |
